From baa40671d3e3b590a33b2c0e022db61cbebf5c00 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 3 Oct 2013 12:46:44 -0400 Subject: autofs4: make freeing sbi rcu-delayed makes ->d_managed() safety in RCU mode independent from vfsmount_lock Signed-off-by: Al Viro --- fs/autofs4/inode.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'fs/autofs4/inode.c') diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index b104726e2d0a..3b9cc9b973c2 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -56,18 +56,13 @@ void autofs4_kill_sb(struct super_block *sb) * just call kill_anon_super when we are called from * deactivate_super. */ - if (!sbi) - goto out_kill_sb; - - /* Free wait queues, close pipe */ - autofs4_catatonic_mode(sbi); - - sb->s_fs_info = NULL; - kfree(sbi); + if (sbi) /* Free wait queues, close pipe */ + autofs4_catatonic_mode(sbi); -out_kill_sb: DPRINTK("shutting down"); kill_litter_super(sb); + if (sbi) + kfree_rcu(sbi, rcu); } static int autofs4_show_options(struct seq_file *m, struct dentry *root) -- cgit v1.2.3-59-g8ed1b