svn commit: r234845 - stable/9/sys/gnu/fs/reiserfs
Jean-Sebastien Pedron
dumbbell at FreeBSD.org
Mon Apr 30 15:46:42 UTC 2012
Author: dumbbell
Date: Mon Apr 30 15:46:41 2012
New Revision: 234845
URL: http://svn.freebsd.org/changeset/base/234845
Log:
MFC r233575:
Make ReiserFS MPSAFE
Most functions seemed to be already fine w.r.t. what's done in msdosfs.
Modified:
stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
==============================================================================
--- stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Mon Apr 30 13:44:04 2012 (r234844)
+++ stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Mon Apr 30 15:46:41 2012 (r234845)
@@ -231,6 +231,7 @@ reiserfs_unmount(struct mount *mp, int m
g_topology_unlock();
PICKUP_GIANT();
vrele(rmp->rm_devvp);
+ dev_rel(rmp->rm_dev);
if (sbi) {
reiserfs_log(LOG_DEBUG, "free sbi\n");
@@ -430,21 +431,25 @@ reiserfs_mountfs(struct vnode *devvp, st
struct reiserfs_mount *rmp;
struct reiserfs_sb_info *sbi;
struct reiserfs_super_block *rs;
- struct cdev *dev = devvp->v_rdev;
+ struct cdev *dev;
struct g_consumer *cp;
struct bufobj *bo;
//ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
+ dev = devvp->v_rdev;
+ dev_ref(dev);
DROP_GIANT();
g_topology_lock();
error = g_vfs_open(devvp, &cp, "reiserfs", /* read-only */ 0);
g_topology_unlock();
PICKUP_GIANT();
VOP_UNLOCK(devvp, 0);
- if (error)
+ if (error) {
+ dev_rel(dev);
return (error);
+ }
bo = &devvp->v_bufobj;
bo->bo_private = cp;
@@ -575,6 +580,7 @@ reiserfs_mountfs(struct vnode *devvp, st
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
MNT_ILOCK(mp);
mp->mnt_flag |= MNT_LOCAL;
+ mp->mnt_kern_flag |= MNTK_MPSAFE;
MNT_IUNLOCK(mp);
#if defined(si_mountpoint)
devvp->v_rdev->si_mountpoint = mp;
@@ -590,7 +596,8 @@ out:
for (i = 0; i < SB_BMAP_NR(sbi); i++) {
if (!SB_AP_BITMAP(sbi)[i].bp_data)
break;
- free(SB_AP_BITMAP(sbi)[i].bp_data, M_REISERFSMNT);
+ free(SB_AP_BITMAP(sbi)[i].bp_data,
+ M_REISERFSMNT);
}
free(SB_AP_BITMAP(sbi), M_REISERFSMNT);
}
@@ -613,6 +620,7 @@ out:
free(sbi, M_REISERFSMNT);
if (rmp)
free(rmp, M_REISERFSMNT);
+ dev_rel(dev);
return (error);
}
More information about the svn-src-stable-9
mailing list