lock_kernel();
#endif
- /* If it's a negative dentry, then there's nothing to do. */
- if (!vcp) {
-#ifdef AFS_LINUX24_ENV
- unlock_kernel();
-#endif
- AFS_GUNLOCK();
- return 0;
- }
-
/* Drop the dentry if the callback is broken */
if (!(vcp->states & CStatd)) {
- d_drop(dp);
+ d_drop(dp);
#ifdef AFS_LINUX24_ENV
- unlock_kernel();
+ unlock_kernel();
#endif
- AFS_GUNLOCK();
+ AFS_GUNLOCK();
return 0;
}
struct vrequest treq;
struct vcache *vcp = (struct vcache*)dp->d_inode;
- AFS_GLOCK();
-#ifdef AFS_LINUX24_ENV
- lock_kernel();
-#endif
-
/* If it's a negative dentry, then there's nothing to do. */
- if (!vcp) {
-#ifdef AFS_LINUX24_ENV
- unlock_kernel();
-#endif
- AFS_GUNLOCK();
- return 0;
- }
-
- /* Make this a fast path (no crref), since it's called so often. */
- if (vcp->states & CStatd) {
- if (*dp->d_name.name != '/' && vcp->mvstat == 2) /* root vnode */
- check_bad_parent(dp); /* check and correct mvid */
- vcache2inode(vcp);
-#ifdef AFS_LINUX24_ENV
- unlock_kernel();
-#endif
- AFS_GUNLOCK();
- return 0;
- }
+ if (!vcp)
+ goto out_valid;
- credp = crref();
- code = afs_InitReq(&treq, credp);
- if (!code)
- code = afs_VerifyVCache(vcp, &treq);
+ if (afs_linux_revalidate(dp) == 0)
+ goto out_valid;
-#ifdef AFS_LINUX24_ENV
- unlock_kernel();
-#endif
- AFS_GUNLOCK();
- crfree(credp);
+out_bad:
+ return 0;
+out_valid:
return 1;
+
}
/* afs_dentry_iput */