]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
libafs: fix some nits around the symlink VOP
authorBen Kaduk <kaduk@mit.edu>
Wed, 4 Dec 2013 23:43:51 +0000 (18:43 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 26 Nov 2014 13:15:03 +0000 (08:15 -0500)
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 <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/afs/DARWIN/osi_vnodeops.c
src/afs/LINUX24/osi_vnodeops.c
src/afs/UKERNEL/afs_usrops.c
src/afs/UKERNEL/sysincludes.h
src/afs/VNOPS/afs_vnop_symlink.c

index d49c96db02b33fcb9efc59c922a7175846830200..b3fcea063032b32f3cd438deea86910d7f1c61ec 100644 (file)
@@ -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;
index cfbcca392ca0a49d8ca692952a6a0db8ff6c8433..a17a43930637b242bb6afc27e17a0f36c4023aa0 100644 (file)
@@ -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);
index 009d27a2b5085b5be760f446dc02ee9003e851b9..809d5cdf9d98c83180d32a330b045beba2f16fcf 100644 (file)
@@ -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;
index bca0ceb5524b9d4ae454b9c21c5f485630067ac5..fd906dea3e447b27b97960cba6d6eae3badf70e1 100644 (file)
@@ -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);
index 0571627b5dba68312e5672bfd43ff902124cecae..1e930db87cbda6a25af3c854844ff1a624a80542 100644 (file)
@@ -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;