-static inline struct dentry *do_revalidate(struct dentry *dentry, struct nameidata *nd)
-{
- int status = dentry->d_op->d_revalidate(dentry, nd);
- if (unlikely(status <= 0)) {
- /*
- * The dentry failed validation.
- * If d_revalidate returned 0 attempt to invalidate
- * the dentry otherwise d_revalidate is asking us
- * to return a fail status.
- */
- if (!status) {
- if (!d_invalidate(dentry)) {
- dput(dentry);
- dentry = NULL;
- }
- } else {
- dput(dentry);
- dentry = ERR_PTR(status);
- }
- }
- return dentry;
-}
-