Put generic_show_options read access to s_options under rcu_read_lock, split save_mount_options() into "we are setting it the first time" (uses in foo_fill_super()) and "we are relacing and freeing the old one", synchronize_rcu() before kfree() in the latter.
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -2368,6 +2368,7 @@ extern void file_update_time(struct file *file); · 2367 unmodified lines | ||
| 2368 | 2368 | |
| 2369 | 2369 | extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); |
| 2370 | 2370 | extern void save_mount_options(struct super_block *sb, char *options); |
| 2371 | +extern void replace_mount_options(struct super_block *sb, char *options); | |
| 2371 | 2372 | |
| 2372 | 2373 | static inline ino_t parent_ino(struct dentry *dentry) |
| 2373 | 2374 | { |