summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authoravatar <avatar@FreeBSD.org>2012-08-01 23:05:57 +0000
committeravatar <avatar@FreeBSD.org>2012-08-01 23:05:57 +0000
commite5bd3e99adcf79f279e259ec91941baf9fe87742 (patch)
treef15c7105682781503e5a6cd1bc1737dd31fc337c /sys/gnu
parent3c9b732c82bfa914b21dab9569cadf47f3f7a913 (diff)
downloadFreeBSD-src-e5bd3e99adcf79f279e259ec91941baf9fe87742.zip
FreeBSD-src-e5bd3e99adcf79f279e259ec91941baf9fe87742.tar.gz
Just like the other file systems found in /sys/fs, g_vfs_open()
should be paried with g_vfs_close(). Though g_vfs_close() is a wrapper around g_wither_geom_close(), r206130 added the following test in g_vfs_open(): if (bo->bo_private != vp) return (EBUSY); Which will cause a 'Device busy' error inside reiserfs_mountfs() if the same file system is re-mounted again after umount or mounting failure: (case 1, /dev/ad4s3 is not a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Invalid argument # mount -t msdosfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy (case 2, /dev/ad4s3 is a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt # umount /mnt # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy On the other hand, g_vfs_close() 'fixed' the above cases by doing an extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers synchronised. Reviewed by: kib MFC after: 1 month
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_vfsops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
index e98ed48..825111e 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
@@ -227,7 +227,7 @@ reiserfs_unmount(struct mount *mp, int mntflags)
DROP_GIANT();
g_topology_lock();
- g_wither_geom_close(rmp->rm_cp->geom, ENXIO);
+ g_vfs_close(rmp->rm_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(rmp->rm_devvp);
@@ -611,7 +611,7 @@ out:
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_wither_geom_close(cp->geom, ENXIO);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
OpenPOWER on IntegriCloud