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/ufs | |
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/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 2 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 27f40d2..c367d66 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -557,7 +557,7 @@ loop: VI_UNLOCK(xvp); if (snapdebug) vprint("ffs_snapshot: busy vnode", xvp); - if (VOP_GETATTR(xvp, &vat, td->td_ucred, td) == 0 && + if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 && vat.va_nlink > 0) { VOP_UNLOCK(xvp, 0); vdrop(xvp); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 3c27dbd..d3a5c70 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -402,7 +402,6 @@ ufs_getattr(ap) struct vnode *a_vp; struct vattr *a_vap; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { struct vnode *vp = ap->a_vp; @@ -466,14 +465,13 @@ ufs_setattr(ap) struct vnode *a_vp; struct vattr *a_vap; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { struct vattr *vap = ap->a_vap; struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; + struct thread *td = curthread; int error; /* |