diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index c6b5fb551ca..e8ed48ecb3c 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -779,12 +779,12 @@ msdosfs_unmount(struct mount *mp, int mntflags, struct thread *td) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; error = vflush(mp, 0, flags, td); - if (error) + if (error && error != ENXIO) return error; pmp = VFSTOMSDOSFS(mp); if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) { error = markvoldirty(pmp, 0); - if (error) { + if (error && error != ENXIO) { (void)markvoldirty(pmp, 1); return (error); } @@ -835,7 +835,7 @@ msdosfs_unmount(struct mount *mp, int mntflags, struct thread *td) MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; MNT_IUNLOCK(mp); - return (0); + return (error); } static int diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d9304045ad4..3e0760fffa1 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1079,7 +1079,7 @@ ffs_unmount(mp, mntflags, td) error = softdep_flushfiles(mp, flags, td); else error = ffs_flushfiles(mp, flags, td); - if (error != 0) + if (error != 0 && error != ENXIO) goto fail; UFS_LOCK(ump); @@ -1094,7 +1094,7 @@ ffs_unmount(mp, mntflags, td) if (fs->fs_ronly == 0) { fs->fs_clean = fs->fs_flags & (FS_UNCLEAN|FS_NEEDSFSCK) ? 0 : 1; error = ffs_sbupdate(ump, MNT_WAIT, 0); - if (error) { + if (error && error != ENXIO) { fs->fs_clean = 0; goto fail; }