Fix vcache/vnode mismatch in lookup for DARWIN
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Jan 2014 21:27:44 +0000 (16:27 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Sun, 12 Jan 2014 19:43:16 +0000 (11:43 -0800)
We have a vcache and need a vnode, so AFSTOV() is the right macro,
not VTOAFS().

It's kind of unfortunate that --enable-checking doesn't catch this.

Change-Id: I924649918dd0149b5fd7e4380b5f2e49d21fc8c4
Reviewed-on: http://gerrit.openafs.org/10702
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/VNOPS/afs_vnop_lookup.c

index 0faae09..ee95ac5 100644 (file)
@@ -861,7 +861,7 @@ afs_DoBulkStat(struct vcache *adp, long dirCookie, struct vrequest *areqp)
                    else
                        tvcp->f.m.Type = VREG;
                    /* finalize to a best guess */
-                   afs_darwin_finalizevnode(tvcp, VTOAFS(adp), NULL, 0, 1);
+                   afs_darwin_finalizevnode(tvcp, AFSTOV(adp), NULL, 0, 1);
                    /* re-acquire usecount that finalizevnode disposed of */
                    vnode_ref(AFSTOV(tvcp));
 #endif