summaryrefslogtreecommitdiffstats
path: root/fs/autofs/dirhash.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs/dirhash.c')
-rw-r--r--fs/autofs/dirhash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/autofs/dirhash.c b/fs/autofs/dirhash.c
index d861dc59d..b5626e5bb 100644
--- a/fs/autofs/dirhash.c
+++ b/fs/autofs/dirhash.c
@@ -78,8 +78,7 @@ struct autofs_dir_ent *autofs_expire(struct super_block *sb,
/* Make sure entry is mounted and unused; note that dentry will
point to the mounted-on-top root. */
- if ( !S_ISDIR(dentry->d_inode->i_mode)
- || dentry->d_mounts == dentry ) {
+ if (!S_ISDIR(dentry->d_inode->i_mode)||!d_mountpoint(dentry)) {
DPRINTK(("autofs: not expirable (not a mounted directory): %s\n", ent->name));
continue;
}