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:
parent
420d65d9e4
commit
2359e2dcc3
@ -796,17 +796,17 @@ msdosfs_unmount(struct mount *mp, int mntflags)
|
|||||||
struct msdosfsmount *pmp;
|
struct msdosfsmount *pmp;
|
||||||
int error, flags;
|
int error, flags;
|
||||||
|
|
||||||
flags = 0;
|
error = flags = 0;
|
||||||
error = msdosfs_sync(mp, MNT_WAIT);
|
pmp = VFSTOMSDOSFS(mp);
|
||||||
if ((mntflags & MNT_FORCE) != 0) {
|
if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0)
|
||||||
|
error = msdosfs_sync(mp, MNT_WAIT);
|
||||||
|
if ((mntflags & MNT_FORCE) != 0)
|
||||||
flags |= FORCECLOSE;
|
flags |= FORCECLOSE;
|
||||||
} else if (error != 0) {
|
else if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
}
|
|
||||||
error = vflush(mp, 0, flags, curthread);
|
error = vflush(mp, 0, flags, curthread);
|
||||||
if (error != 0 && error != ENXIO)
|
if (error != 0 && error != ENXIO)
|
||||||
return (error);
|
return (error);
|
||||||
pmp = VFSTOMSDOSFS(mp);
|
|
||||||
if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) {
|
if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) {
|
||||||
error = markvoldirty(pmp, 0);
|
error = markvoldirty(pmp, 0);
|
||||||
if (error && error != ENXIO) {
|
if (error && error != ENXIO) {
|
||||||
|
Loading…
Reference in New Issue
Block a user