diff options
author | Ian Kent <raven@themaw.net> | 2012-08-16 23:09:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-17 09:56:39 -0400 |
commit | d807ff838f48e7778996e577e2a57a5796c32e84 (patch) | |
tree | cb1ced2dff92e1b973ff171e120ebaa7493b924f /fs/autofs4 | |
parent | d9875690d9b89a866022ff49e3fcea892345ad92 (diff) |
autofs4 - fix expire check
In some cases when an autofs indirect mount is contained in a file
system that is marked as shared (such as when systemd does the
equivalent of "mount --make-rshared /" early in the boot), mounts
stop expiring.
When this happens the first expiry check on a mountpoint dentry in
autofs_expire_indirect() sees a mountpoint dentry with a higher
than minimal reference count. Consequently the dentry is condidered
busy and the actual expiry check is never done.
This particular check was originally meant as an optimisation to
detect a path walk in progress but with the addition of rcu-walk
it can be ineffective anyway.
Removing the test allows automounts to expire again since the
actual expire check doesn't rely on the dentry reference count.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/expire.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c index 8c0e56d92938..842d00048a65 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c | |||
@@ -399,11 +399,6 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb, | |||
399 | DPRINTK("checking mountpoint %p %.*s", | 399 | DPRINTK("checking mountpoint %p %.*s", |
400 | dentry, (int)dentry->d_name.len, dentry->d_name.name); | 400 | dentry, (int)dentry->d_name.len, dentry->d_name.name); |
401 | 401 | ||
402 | /* Path walk currently on this dentry? */ | ||
403 | ino_count = atomic_read(&ino->count) + 2; | ||
404 | if (dentry->d_count > ino_count) | ||
405 | goto next; | ||
406 | |||
407 | /* Can we umount this guy */ | 402 | /* Can we umount this guy */ |
408 | if (autofs4_mount_busy(mnt, dentry)) | 403 | if (autofs4_mount_busy(mnt, dentry)) |
409 | goto next; | 404 | goto next; |