diff options
author | attilio <attilio@FreeBSD.org> | 2008-01-10 01:10:58 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-01-10 01:10:58 +0000 |
commit | 18d0a0dd51c7995ce9e549616f78ef724096b1bd (patch) | |
tree | c4e28d990eaa525916ab09f2bd1d9c6ddf2c8dea /sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | |
parent | 8df9c26bfdf7538c15226c902c07a0fe350ace36 (diff) | |
download | FreeBSD-src-18d0a0dd51c7995ce9e549616f78ef724096b1bd.zip FreeBSD-src-18d0a0dd51c7995ce9e549616f78ef724096b1bd.tar.gz |
vn_lock() is currently only used with the 'curthread' passed as argument.
Remove this argument and pass curthread directly to underlying
VOP_LOCK1() VFS method. This modify makes the code cleaner and in
particular remove an annoying dependence helping next lockmgr() cleanup.
KPI results, obviously, changed.
Manpage and FreeBSD_version will be updated through further commits.
As a side note, would be valuable to say that next commits will address
a similar cleanup about VFS methods, in particular vop_lock1 and
vop_unlock.
Tested by: Diego Sardina <siarodx at gmail dot com>,
Andrea Di Pasquale <whyx dot it at gmail dot com>
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 | 8 |
1 files changed, 4 insertions, 4 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 e08785a..28f3293 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -663,7 +663,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, flags, td); + error = vn_lock(*vpp, flags); (*vpp)->v_vflag |= VV_ROOT; } @@ -763,7 +763,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp) *vpp = NULL; else { *vpp = ZTOV(zp); - vn_lock(*vpp, flags, curthread); + vn_lock(*vpp, flags); } ZFS_EXIT(zfsvfs); return (err); @@ -830,7 +830,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) } ZFS_EXIT(zfsvfs); /* XXX: LK_RETRY? */ - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); return (0); } @@ -853,7 +853,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); + vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); vnode_create_vobject(*vpp, zp->z_phys->zp_size, td); ZFS_EXIT(zfsvfs); return (0); |