aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/inode.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-10-20 02:28:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 13:26:38 -0400
commit0e7d73824e6b0024100701da246fec769dd8f087 (patch)
tree43fd5dd81dd39cb06253bd53aed2d91daaf13763 /fs/autofs/inode.c
parentf2fbc6c2dad7bbcbf226c094749534f1e84d3be2 (diff)
[PATCH] autofs3: Make sure all dentries refs are released before calling kill_anon_super()
Make sure all dentries refs are released before calling kill_anon_super() so that the assumption that generic_shutdown_super() can completely destroy the dentry tree for there will be no external references holds true. What was being done in the put_super() superblock op, is now done in the kill_sb() filesystem op instead, prior to calling kill_anon_super(). The call to shrink_dcache_sb() is removed as it is redundant since shrink_dcache_for_umount() will now be called after the cleanup routine. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Ian Kent <raven@themaw.net> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/autofs/inode.c')
-rw-r--r--fs/autofs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 2c9759baad61..54c518c89e4c 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -20,7 +20,7 @@
20#include "autofs_i.h" 20#include "autofs_i.h"
21#include <linux/module.h> 21#include <linux/module.h>
22 22
23static void autofs_put_super(struct super_block *sb) 23void autofs_kill_sb(struct super_block *sb)
24{ 24{
25 struct autofs_sb_info *sbi = autofs_sbi(sb); 25 struct autofs_sb_info *sbi = autofs_sbi(sb);
26 unsigned int n; 26 unsigned int n;
@@ -37,13 +37,13 @@ static void autofs_put_super(struct super_block *sb)
37 kfree(sb->s_fs_info); 37 kfree(sb->s_fs_info);
38 38
39 DPRINTK(("autofs: shutting down\n")); 39 DPRINTK(("autofs: shutting down\n"));
40 kill_anon_super(sb);
40} 41}
41 42
42static void autofs_read_inode(struct inode *inode); 43static void autofs_read_inode(struct inode *inode);
43 44
44static struct super_operations autofs_sops = { 45static struct super_operations autofs_sops = {
45 .read_inode = autofs_read_inode, 46 .read_inode = autofs_read_inode,
46 .put_super = autofs_put_super,
47 .statfs = simple_statfs, 47 .statfs = simple_statfs,
48}; 48};
49 49