static int ll_revalidate_dentry(struct dentry *dentry,
unsigned int lookup_flags)
{
struct inode *dir = dentry->d_parent->d_inode;
/* If this is intermediate component path lookup and we were able to get
* to this dentry, then its lock has not been revoked and the
* path component is valid. */
if (lookup_flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))
return 1;
#ifdef HAVE_IOP_GET_LINK
if (dentry->d_inode && dentry->d_inode->i_op->get_link)
#else
if (dentry->d_inode && dentry->d_inode->i_op->follow_link)
#endif
return 1;
/*
* VFS warns us that this is the second go around and previous
* operation failed (most likely open|creat), so this time
* we better talk to the server via the lookup path by name,
* not by fid.
*/
if (lookup_flags & LOOKUP_REVAL)
return 0;
if (!dentry_may_statahead(dir, dentry))
return 1;
#ifndef HAVE_DCACHE_LOCK
if (lookup_flags & LOOKUP_RCU)
return -ECHILD;
#endif
ll_statahead(dir, &dentry, dentry->d_inode == NULL);
return 1;
}
Landed for 2.10