diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 2252831003a2..da207c612257 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -950,6 +950,12 @@ msdosfs_sync(struct mount *mp, int waitfor) error = msdosfs_fsiflush(pmp, waitfor); if (error != 0) allerror = error; + + if (allerror == 0 && waitfor == MNT_SUSPEND) { + MNT_ILOCK(mp); + mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; + MNT_IUNLOCK(mp); + } return (allerror); } diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 11d26386f645..857eefb384d9 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -848,7 +848,7 @@ msdosfs_fsync(struct vop_fsync_args *ap) * Non-critical metadata for associated directory entries only * gets synced accidentally, as in most file systems. */ - if (ap->a_waitfor == MNT_WAIT) { + if (ap->a_waitfor != MNT_NOWAIT) { devvp = VTODE(ap->a_vp)->de_pmp->pm_devvp; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); allerror = VOP_FSYNC(devvp, MNT_WAIT, ap->a_td); @@ -856,7 +856,7 @@ msdosfs_fsync(struct vop_fsync_args *ap) } else allerror = 0; - error = deupdat(VTODE(ap->a_vp), ap->a_waitfor == MNT_WAIT); + error = deupdat(VTODE(ap->a_vp), ap->a_waitfor != MNT_NOWAIT); if (allerror == 0) allerror = error; return (allerror);