we happily go to the "good dentry" path and exit, leaking the
result of dget_parent, if parent is globalVp. Let's not
Change-Id: I3848a1aa2611d17ba08e04b3f33f22623645d233
Reviewed-on: http://gerrit.openafs.org/3448
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs_InitFakeStat(&fakestate);
if (dp->d_inode) {
- parent = dget_parent(dp);
- pvcp = VTOAFS(parent->d_inode);
vcp = VTOAFS(dp->d_inode);
if (vcp == afs_globalVp)
goto good_dentry;
+ parent = dget_parent(dp);
+ pvcp = VTOAFS(parent->d_inode);
+
if ((vcp->mvstat == 1) || (vcp->mvstat == 2)) { /* need to lock */
credp = crref();
AFS_GLOCK();