diff options
author | attilio <attilio@FreeBSD.org> | 2008-08-28 15:23:18 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-08-28 15:23:18 +0000 |
commit | dbf35e279f37ad4a573bf93923d141cb4a454c7d (patch) | |
tree | 61fe2ab5660fec327061e18eda0ed8c65276f262 /sys/kern/vfs_subr.c | |
parent | fb7f3b6363b61cead7eb5e94ac7f816358fc19ab (diff) | |
download | FreeBSD-src-dbf35e279f37ad4a573bf93923d141cb4a454c7d.zip FreeBSD-src-dbf35e279f37ad4a573bf93923d141cb4a454c7d.tar.gz |
Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed thread
was always curthread and totally unuseful.
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3bc2341..d097d13 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2379,7 +2379,7 @@ loop: * vnodes open for writing. */ if (flags & WRITECLOSE) { - error = VOP_GETATTR(vp, &vattr, td->td_ucred, td); + error = VOP_GETATTR(vp, &vattr, td->td_ucred); VI_LOCK(vp); if ((vp->v_type == VNON || @@ -4111,7 +4111,7 @@ filt_vfsread(struct knote *kn, long hint) return (1); } - if (VOP_GETATTR(vp, &va, curthread->td_ucred, curthread)) + if (VOP_GETATTR(vp, &va, curthread->td_ucred)) return (0); kn->kn_data = va.va_size - kn->kn_fp->f_offset; @@ -4181,13 +4181,13 @@ vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off) * directly setting va_atime for the sake of efficiency. */ void -vfs_mark_atime(struct vnode *vp, struct thread *td) +vfs_mark_atime(struct vnode *vp, struct ucred *cred) { struct vattr atimeattr; if ((vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0) { VATTR_NULL(&atimeattr); atimeattr.va_vaflags |= VA_MARK_ATIME; - (void)VOP_SETATTR(vp, &atimeattr, td->td_ucred, td); + (void)VOP_SETATTR(vp, &atimeattr, cred); } } |