MFC r275638:
Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.
This commit is contained in:
parent
9a7db864f7
commit
8630086ac2
@ -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);
|
||||
|
@ -1305,8 +1305,8 @@ dounmount(mp, flags, td)
|
||||
}
|
||||
vput(fsrootvp);
|
||||
}
|
||||
if (((mp->mnt_flag & MNT_RDONLY) ||
|
||||
(error = VFS_SYNC(mp, MNT_WAIT)) == 0) || (flags & MNT_FORCE) != 0)
|
||||
if ((mp->mnt_flag & MNT_RDONLY) != 0 || (flags & MNT_FORCE) != 0 ||
|
||||
(error = VFS_SYNC(mp, MNT_WAIT)) == 0)
|
||||
error = VFS_UNMOUNT(mp, flags);
|
||||
vn_finished_write(mp);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user