diff options
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c | 8 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c | 6 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/vnode.h | 7 |
3 files changed, 10 insertions, 11 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c index 6014c2e..efb2885 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c @@ -77,12 +77,12 @@ kobj_open_file_vnode(const char *file) flags = FREAD; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td); - error = vn_open_cred(&nd, &flags, 0, td->td_ucred, NULL); + error = vn_open_cred(&nd, &flags, 0, curthread->td_ucred, NULL); NDFREE(&nd, NDF_ONLY_PNBUF); if (error != 0) return (NULL); /* We just unlock so we hold a reference. */ - VOP_UNLOCK(nd.ni_vp, 0, td); + VOP_UNLOCK(nd.ni_vp, 0); return (nd.ni_vp); } @@ -125,7 +125,7 @@ kobj_get_filesize_vnode(struct _buf *file, uint64_t *size) vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, td->td_ucred, td); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); if (error == 0) *size = (uint64_t)va.va_size; return (error); @@ -178,7 +178,7 @@ kobj_read_file_vnode(struct _buf *file, char *buf, unsigned size, unsigned off) vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); return (error != 0 ? -1 : size - auio.uio_resid); } diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c index 93eba51..166eeed 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c @@ -194,7 +194,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, */ vn_lock(vp, LK_SHARED | LK_RETRY); mp = vfs_mount_alloc(vp, vfsp, fspath, td); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); mp->mnt_optnew = NULL; vfs_setmntopt(mp, "from", fspec, 0); @@ -260,7 +260,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, panic("mount: lost mount"); mountcheckdirs(vp, mvp); vput(mvp); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); if ((mp->mnt_flag & MNT_RDONLY) == 0) error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp, td); @@ -272,7 +272,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); vfs_unbusy(mp, td); vfs_mount_destroy(mp); } diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h index 171b7fe..a8a261c 100644 --- a/sys/cddl/compat/opensolaris/sys/vnode.h +++ b/sys/cddl/compat/opensolaris/sys/vnode.h @@ -175,7 +175,7 @@ zfs_vn_open(char *pnamep, enum uio_seg seg, int filemode, int createmode, if (error == 0) { /* We just unlock so we hold a reference. */ VN_HOLD(nd.ni_vp); - VOP_UNLOCK(nd.ni_vp, 0, td); + VOP_UNLOCK(nd.ni_vp, 0); *vpp = nd.ni_vp; } return (error); @@ -213,7 +213,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, caddr_t base, ssize_t len, static __inline int zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) { - struct thread *td = curthread; struct mount *mp; int error, vfslocked; @@ -223,8 +222,8 @@ zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto drop; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_FSYNC(vp, MNT_WAIT, td); - VOP_UNLOCK(vp, 0, td); + error = VOP_FSYNC(vp, MNT_WAIT, curthread); + VOP_UNLOCK(vp, 0); vn_finished_write(mp); drop: VFS_UNLOCK_GIANT(vfslocked); |