aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2006-03-27 04:14:47 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:39 -0500
commite0a7aae94030b878601eb67686b696de4a3764f0 (patch)
tree721a08b9c124e5e9efe36bec1b501f7999657793 /fs/autofs4/root.c
parent1aff3c8b0511b5bb54acf7859e0c6ec9ae7287a9 (diff)
[PATCH] autofs4: expire mounts that hold no (extra) references only
Alter the expire semantics that define how "busyness" is determined. Currently a last_used counter is updated on every revalidate from processes other than the mount owner process group. This patch changes that so that an expire candidate is busy only if it has a reference count greater than the expected minimum, such as when there is an open file or working directory in use. This method is the only way that busyness can be established for direct mounts within the new implementation. For consistency the expire semantic is made the same for all mounts. A side effect of the patch is that mounts which remain mounted unessessarily in the presence of some GUI programs that scan the filesystem should now expire. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r--fs/autofs4/root.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index d196712c4b94..3a4a5b47575c 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -330,6 +330,10 @@ static int try_to_fill_dentry(struct vfsmount *mnt, struct dentry *dentry, int f
330 if (!autofs4_oz_mode(sbi)) 330 if (!autofs4_oz_mode(sbi))
331 autofs4_update_usage(mnt, dentry); 331 autofs4_update_usage(mnt, dentry);
332 332
333 /* Initialize expiry counter after successful mount */
334 if (ino)
335 ino->last_used = jiffies;
336
333 spin_lock(&dentry->d_lock); 337 spin_lock(&dentry->d_lock);
334 dentry->d_flags &= ~DCACHE_AUTOFS_PENDING; 338 dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
335 spin_unlock(&dentry->d_lock); 339 spin_unlock(&dentry->d_lock);