From 21c9f5341ecb7ef17f37f19406804971090f276f Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Wed, 4 Dec 2013 18:43:51 -0500 Subject: [PATCH] libafs: fix some nits around the symlink VOP Commit 3f4c1099b7b (gerrit 10474) introduced a few issues, addressed here. vpp is idiomatically of type 'struct vnode *', not 'struct vcache *'; use pvc as the name of the parent vcache pointer instead. Fix whitespace. Change-Id: Ic5d98a43446861bb571fe5a260e7ae1eea1051fd Reviewed-on: http://gerrit.openafs.org/10531 Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/afs/DARWIN/osi_vnodeops.c | 10 +++++----- src/afs/LINUX24/osi_vnodeops.c | 2 +- src/afs/UKERNEL/afs_usrops.c | 2 +- src/afs/UKERNEL/sysincludes.h | 2 +- src/afs/VNOPS/afs_vnop_symlink.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index d49c96db0..b3fcea063 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -1655,12 +1655,12 @@ afs_vop_symlink(ap) * } */ *ap; { struct vnode *dvp = ap->a_dvp; - struct vcache *vpp = NULL; + struct vcache *pvc = NULL; int error = 0; GETNAME(); AFS_GLOCK(); - error = afs_symlink(VTOAFS(dvp), name, ap->a_vap, ap->a_target, &vpp, + error = afs_symlink(VTOAFS(dvp), name, ap->a_vap, ap->a_target, &pvc, vop_cn_cred); AFS_GUNLOCK(); #ifndef AFS_DARWIN80_ENV @@ -1669,9 +1669,9 @@ afs_vop_symlink(ap) #endif *ap->a_vpp = NULL; if (!error) { - error = afs_darwin_finalizevnode(vpp, dvp, ap->a_cnp, 0, 0); - if (! error) - *ap->a_vpp = AFSTOV(vpp); + error = afs_darwin_finalizevnode(pvc, dvp, ap->a_cnp, 0, 0); + if (!error) + *ap->a_vpp = AFSTOV(pvc); } DROPNAME(); return error; diff --git a/src/afs/LINUX24/osi_vnodeops.c b/src/afs/LINUX24/osi_vnodeops.c index cfbcca392..a17a43930 100644 --- a/src/afs/LINUX24/osi_vnodeops.c +++ b/src/afs/LINUX24/osi_vnodeops.c @@ -1432,7 +1432,7 @@ afs_linux_symlink(struct inode *dip, struct dentry *dp, const char *target) VATTR_NULL(&vattr); AFS_GLOCK(); code = afs_symlink(VTOAFS(dip), (char *)name, &vattr, (char *)target, NULL, - credp); + credp); AFS_GUNLOCK(); crfree(credp); return afs_convert_code(code); diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 009d27a2b..809d5cdf9 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -3055,7 +3055,7 @@ uafs_symlink_r(char *target, char *source) attrs.va_uid = afs_cr_uid(get_user_struct()->u_cred); attrs.va_gid = afs_cr_gid(get_user_struct()->u_cred); code = afs_symlink(VTOAFS(dirP), nameP, &attrs, target, NULL, - get_user_struct()->u_cred); + get_user_struct()->u_cred); VN_RELE(dirP); if (code != 0) { errno = code; diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index bca0ceb55..fd906dea3 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -1157,7 +1157,7 @@ struct usr_vnodeops { int (*vn_rmdir) (struct vcache *adp, char *, afs_ucred_t *); int (*vn_readdir) (struct vcache *avc, struct uio *, afs_ucred_t *); int (*vn_symlink) (struct vcache *adp, char *, struct vattr *, char *, - struct vcache **vpp, afs_ucred_t *); + struct vcache **pvc, afs_ucred_t *); int (*vn_readlink) (struct vcache *avc, struct uio *, afs_ucred_t *); int (*vn_fsync) (struct vcache *avc, afs_ucred_t *); int (*vn_inactive) (struct vcache *avc, afs_ucred_t *acred); diff --git a/src/afs/VNOPS/afs_vnop_symlink.c b/src/afs/VNOPS/afs_vnop_symlink.c index 0571627b5..1e930db87 100644 --- a/src/afs/VNOPS/afs_vnop_symlink.c +++ b/src/afs/VNOPS/afs_vnop_symlink.c @@ -288,7 +288,7 @@ afs_symlink(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, ReleaseWriteLock(&tvc->lock); ReleaseWriteLock(&afs_xvcache); if (tvcp) - *tvcp = tvc; + *tvcp = tvc; else afs_PutVCache(tvc); code = 0; -- 2.39.5