summaryrefslogtreecommitdiff
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-05-09 00:05:57 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 18:51:34 +0400
commit2a32cebd6cbcc43996c3e2d114fa32ba1e71192a (patch)
tree0ad94849a7bc3e97cd19978005d1898c8bb44b36 /fs/reiserfs/super.c
parentf9dbd05bc97d1d4f17c2057612f6a8e4dbd039e0 (diff)
downloadlinux-2a32cebd6cbcc43996c3e2d114fa32ba1e71192a.tar.xz
Fix races around the access to ->s_options
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. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index d444fe0013a4..1215a4f50cd2 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1316,8 +1316,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
}
out_ok:
- kfree(s->s_options);
- s->s_options = new_opts;
+ replace_mount_options(s, new_opts);
return 0;
out_err: