diff options
-rw-r--r-- | fs/autofs4/root.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 81700f4a19da..b6530f321adb 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -133,7 +133,7 @@ static int autofs4_dir_open(struct inode *inode, struct file *file) | |||
133 | * it. | 133 | * it. |
134 | */ | 134 | */ |
135 | spin_lock(&dcache_lock); | 135 | spin_lock(&dcache_lock); |
136 | if (!d_mountpoint(dentry) && __simple_empty(dentry)) { | 136 | if (!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) { |
137 | spin_unlock(&dcache_lock); | 137 | spin_unlock(&dcache_lock); |
138 | return -ENOENT; | 138 | return -ENOENT; |
139 | } | 139 | } |
@@ -257,7 +257,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
257 | * mount it again. | 257 | * mount it again. |
258 | */ | 258 | */ |
259 | if (ino->flags & AUTOFS_INF_PENDING || | 259 | if (ino->flags & AUTOFS_INF_PENDING || |
260 | (!d_mountpoint(dentry) && __simple_empty(dentry))) { | 260 | (!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs))) { |
261 | spin_unlock(&dcache_lock); | 261 | spin_unlock(&dcache_lock); |
262 | spin_unlock(&sbi->fs_lock); | 262 | spin_unlock(&sbi->fs_lock); |
263 | 263 | ||
@@ -340,8 +340,7 @@ static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
340 | /* Check for a non-mountpoint directory with no contents */ | 340 | /* Check for a non-mountpoint directory with no contents */ |
341 | spin_lock(&dcache_lock); | 341 | spin_lock(&dcache_lock); |
342 | if (S_ISDIR(dentry->d_inode->i_mode) && | 342 | if (S_ISDIR(dentry->d_inode->i_mode) && |
343 | !d_mountpoint(dentry) && | 343 | !d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) { |
344 | __simple_empty(dentry)) { | ||
345 | DPRINTK("dentry=%p %.*s, emptydir", | 344 | DPRINTK("dentry=%p %.*s, emptydir", |
346 | dentry, dentry->d_name.len, dentry->d_name.name); | 345 | dentry, dentry->d_name.len, dentry->d_name.name); |
347 | spin_unlock(&dcache_lock); | 346 | spin_unlock(&dcache_lock); |