diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-02 00:09:34 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-02 00:09:34 +0000 |
commit | b7da9e60c9a6d5eb35568a2699a3aa887019ae33 (patch) | |
tree | b7a010335145f4402830dfa70ac93049afc09c31 /sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | |
parent | 40cd52d5581515f402756a317c99a655fbdbe632 (diff) | |
download | FreeBSD-src-b7da9e60c9a6d5eb35568a2699a3aa887019ae33.zip FreeBSD-src-b7da9e60c9a6d5eb35568a2699a3aa887019ae33.tar.gz |
- Lock vnode with flags passed in as argument in zfs_vget() and zfs_root().
Pointed out by: ups
Also reported by: kris
- Add comments where I'm not sure if LK_RETRY should be used.
Diffstat (limited to 'sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c')
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index 5a11abca..e274a7e 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -666,7 +666,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t **vpp, kthread_t *td) error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (error == 0) { *vpp = ZTOV(rootzp); - error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td); + error = vn_lock(*vpp, flags, td); (*vpp)->v_vflag |= VV_ROOT; } @@ -766,7 +766,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp) *vpp = NULL; else { *vpp = ZTOV(zp); - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread); + vn_lock(*vpp, flags, curthread); } ZFS_EXIT(zfsvfs); return (0); @@ -832,6 +832,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) VN_HOLD(*vpp); } ZFS_EXIT(zfsvfs); + /* XXX: LK_RETRY? */ vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td); return (0); } @@ -854,6 +855,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) } *vpp = ZTOV(zp); + /* XXX: LK_RETRY? */ vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td); vnode_create_vobject(*vpp, zp->z_phys->zp_size, td); ZFS_EXIT(zfsvfs); |