Commit baa40671d3e3b590a33b2c0e022db61cbebf5c00
1 parent
2d1d9b5b5c
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
autofs4: make freeing sbi rcu-delayed
makes ->d_managed() safety in RCU mode independent from vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 2 changed files with 5 additions and 9 deletions Side-by-side Diff
fs/autofs4/autofs_i.h
fs/autofs4/inode.c
... | ... | @@ -56,18 +56,13 @@ |
56 | 56 | * just call kill_anon_super when we are called from |
57 | 57 | * deactivate_super. |
58 | 58 | */ |
59 | - if (!sbi) | |
60 | - goto out_kill_sb; | |
59 | + if (sbi) /* Free wait queues, close pipe */ | |
60 | + autofs4_catatonic_mode(sbi); | |
61 | 61 | |
62 | - /* Free wait queues, close pipe */ | |
63 | - autofs4_catatonic_mode(sbi); | |
64 | - | |
65 | - sb->s_fs_info = NULL; | |
66 | - kfree(sbi); | |
67 | - | |
68 | -out_kill_sb: | |
69 | 62 | DPRINTK("shutting down"); |
70 | 63 | kill_litter_super(sb); |
64 | + if (sbi) | |
65 | + kfree_rcu(sbi, rcu); | |
71 | 66 | } |
72 | 67 | |
73 | 68 | static int autofs4_show_options(struct seq_file *m, struct dentry *root) |