MFC r281121:
Do not call msdosfs_sync() on the read-only msdosfs mounts. PR: 199152
This commit is contained in:
parent
cf6596d5ab
commit
1d6a22da62
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user