Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact,

it should be a nop for ro.

PR:	199152
Reviewed by:	bde (PR version of the patch)
Submitted by:	longwitz@incore.de
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2015-04-05 21:10:38 +00:00
parent 420d65d9e4
commit 2359e2dcc3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281121

View File

@ -796,17 +796,17 @@ msdosfs_unmount(struct mount *mp, int mntflags)
struct msdosfsmount *pmp;
int error, flags;
flags = 0;
error = msdosfs_sync(mp, MNT_WAIT);
if ((mntflags & MNT_FORCE) != 0) {
error = flags = 0;
pmp = VFSTOMSDOSFS(mp);
if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0)
error = msdosfs_sync(mp, MNT_WAIT);
if ((mntflags & MNT_FORCE) != 0)
flags |= FORCECLOSE;
} else if (error != 0) {
else if (error != 0)
return (error);
}
error = vflush(mp, 0, flags, curthread);
if (error != 0 && error != ENXIO)
return (error);
pmp = VFSTOMSDOSFS(mp);
if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) {
error = markvoldirty(pmp, 0);
if (error && error != ENXIO) {