]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
SOLARIS: Fix vnode/vcache casts
authorAndrew Deason <adeason@sinenomine.net>
Thu, 10 Aug 2017 01:06:03 +0000 (20:06 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Mon, 10 Jun 2019 11:50:46 +0000 (07:50 -0400)
A few places were using vnodes and vcaches interchangeably. This is
incorrect, since they may not always be the same thing if we stop
embedding vnodes directly in vcaches Fix these to properly go through
AFSTOV/VTOAFS to convert between vcaches and vnodes.

Reviewed-on: https://gerrit.openafs.org/12695
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
(cherry picked from commit a6499e0b086d964f3fcc65fe4be31edc33015061)

Change-Id: Ia6889966a7c595786f0a273b4c2a5a63fe60ddd3
Reviewed-on: https://gerrit.openafs.org/13527
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/SOLARIS/osi_vfsops.c
src/afs/SOLARIS/osi_vnodeops.c

index 86e5f7803d5164ac5b595df48aa5d499a6049a5c..cd127e44cbb774704cdd47f8b74ff7f5a16d2337 100644 (file)
@@ -121,7 +121,7 @@ afs_unmount(struct vfs *afsp, int flag, afs_ucred_t *credp)
         * besides the caller of afs_unmount */
        rootvp = afs_globalVp;
        afs_globalVp = NULL;
-       AFS_RELE(rootvp);
+       AFS_RELE(AFSTOV(rootvp));
     }
 
     AFS_GUNLOCK();
@@ -254,7 +254,11 @@ afs_vget(struct vfs *afsp, struct vnode **avcp, struct fid *fidp)
 
     *avcp = NULL;
     if (!(code = afs_InitReq(&treq, credp))) {
-       code = afs_osi_vget((struct vcache **)avcp, fidp, &treq);
+        struct vcache *tvc = NULL;
+       code = afs_osi_vget(&tvc, fidp, &treq);
+        if (tvc) {
+            *avcp = AFSTOV(tvc);
+        }
     }
 
     afs_Trace3(afs_iclSetp, CM_TRACE_VGET, ICL_TYPE_POINTER, *avcp,
index fec1b457e785a380002326ab1bd2dabfa83837fe..878a87b50479f85c9ef0be231b6d6d7acb8bd59f 100644 (file)
@@ -1433,7 +1433,7 @@ gafs_rename(struct vnode *odvp, char *aname1,
            vn_setpath(afs_globalVp, pvp, vp, aname2, strlen(aname2));
 # endif /* !HAVE_VN_RENAMEPATH */
 
-           AFS_RELE(avcp);
+           AFS_RELE(AFSTOV(avcp));
        }
     }
 #endif