|
@@ -294,14 +294,13 @@ static int try_to_fill_dentry(struct vfsmount *mnt, struct dentry *dentry, int f
|
|
|
|
|
|
/* Turn this into a real negative dentry? */
|
|
|
if (status == -ENOENT) {
|
|
|
- dentry->d_time = jiffies + AUTOFS_NEGATIVE_TIMEOUT;
|
|
|
spin_lock(&dentry->d_lock);
|
|
|
dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
|
|
|
spin_unlock(&dentry->d_lock);
|
|
|
- return 1;
|
|
|
+ return 0;
|
|
|
} else if (status) {
|
|
|
/* Return a negative dentry, but leave it "pending" */
|
|
|
- return 1;
|
|
|
+ return 0;
|
|
|
}
|
|
|
/* Trigger mount for path component or follow link */
|
|
|
} else if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) ||
|
|
@@ -360,13 +359,13 @@ static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd)
|
|
|
|
|
|
/* Negative dentry.. invalidate if "old" */
|
|
|
if (dentry->d_inode == NULL)
|
|
|
- return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
|
|
|
+ return 0;
|
|
|
|
|
|
/* Check for a non-mountpoint directory with no contents */
|
|
|
spin_lock(&dcache_lock);
|
|
|
if (S_ISDIR(dentry->d_inode->i_mode) &&
|
|
|
!d_mountpoint(dentry) &&
|
|
|
- list_empty(&dentry->d_subdirs)) {
|
|
|
+ simple_empty_nolock(dentry)) {
|
|
|
DPRINTK("dentry=%p %.*s, emptydir",
|
|
|
dentry, dentry->d_name.len, dentry->d_name.name);
|
|
|
spin_unlock(&dcache_lock);
|