MFC r281121:

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

PR:    199152
This commit is contained in:
kib 2015-04-12 07:05:20 +00:00
parent cf6596d5ab
commit 1d6a22da62

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) {