diff options
author | kib <kib@FreeBSD.org> | 2014-12-30 10:30:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-12-30 10:30:12 +0000 |
commit | 8630086ac2460da5edb45eecd6eb3c6bc44dc31f (patch) | |
tree | 8dbb958bea8dcb09881361111bd3973d47c06c0a /sys/fs | |
parent | 9a7db864f78c4821164e142b15574dd789e438fc (diff) | |
download | FreeBSD-src-8630086ac2460da5edb45eecd6eb3c6bc44dc31f.zip FreeBSD-src-8630086ac2460da5edb45eecd6eb3c6bc44dc31f.tar.gz |
MFC r275638:
Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 213dd00..d14cdef 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -797,11 +797,15 @@ msdosfs_unmount(struct mount *mp, int mntflags) int error, flags; flags = 0; - if (mntflags & MNT_FORCE) + error = msdosfs_sync(mp, MNT_WAIT); + if ((mntflags & MNT_FORCE) != 0) { flags |= FORCECLOSE; + } else if (error != 0) { + return (error); + } error = vflush(mp, 0, flags, curthread); - if (error && error != ENXIO) - return error; + if (error != 0 && error != ENXIO) + return (error); pmp = VFSTOMSDOSFS(mp); if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) { error = markvoldirty(pmp, 0); |