summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-02-23 21:09:28 +0000
committertrasz <trasz@FreeBSD.org>2009-02-23 21:09:28 +0000
commit644f63d68b32643bf09dda1bb1cd0e102f4fbf43 (patch)
tree1ffd9a69abd4a4a58bb85a49db7748e575561989 /sys/ufs/ffs
parentde29f650e65ee47a3b0430555b28f248cbceb4da (diff)
downloadFreeBSD-src-644f63d68b32643bf09dda1bb1cd0e102f4fbf43.zip
FreeBSD-src-644f63d68b32643bf09dda1bb1cd0e102f4fbf43.tar.gz
Right now, when trying to unmount a device that's already gone,
msdosfs_unmount() and ffs_unmount() exit early after getting ENXIO. However, dounmount() treats ENXIO as a success and proceeds with unmounting. In effect, the filesystem gets unmounted without closing GEOM provider etc. Reviewed by: kib Approved by: rwatson (mentor) Tested by: dho Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index d930404..3e0760f 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;
}
OpenPOWER on IntegriCloud