aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-04 11:06:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:20 -0500
commiteee5cc2702929fd41cce28058dc6d6717f723f87 (patch)
treed405e2302511adec7d25024679b8ac2cbd95d608 /fs/super.c
parent8b61e74ffc6310e1d35a9b51c8463093851f8bcf (diff)
get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/super.c b/fs/super.c
index 743bb7118053..e5f6c2cfac38 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -140,9 +140,6 @@ static void destroy_super(struct super_block *s)
140 int i; 140 int i;
141 list_lru_destroy(&s->s_dentry_lru); 141 list_lru_destroy(&s->s_dentry_lru);
142 list_lru_destroy(&s->s_inode_lru); 142 list_lru_destroy(&s->s_inode_lru);
143#ifdef CONFIG_SMP
144 free_percpu(s->s_files);
145#endif
146 for (i = 0; i < SB_FREEZE_LEVELS; i++) 143 for (i = 0; i < SB_FREEZE_LEVELS; i++)
147 percpu_counter_destroy(&s->s_writers.counter[i]); 144 percpu_counter_destroy(&s->s_writers.counter[i]);
148 security_sb_free(s); 145 security_sb_free(s);
@@ -172,15 +169,6 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
172 if (security_sb_alloc(s)) 169 if (security_sb_alloc(s))
173 goto fail; 170 goto fail;
174 171
175#ifdef CONFIG_SMP
176 s->s_files = alloc_percpu(struct list_head);
177 if (!s->s_files)
178 goto fail;
179 for_each_possible_cpu(i)
180 INIT_LIST_HEAD(per_cpu_ptr(s->s_files, i));
181#else
182 INIT_LIST_HEAD(&s->s_files);
183#endif
184 for (i = 0; i < SB_FREEZE_LEVELS; i++) { 172 for (i = 0; i < SB_FREEZE_LEVELS; i++) {
185 if (percpu_counter_init(&s->s_writers.counter[i], 0) < 0) 173 if (percpu_counter_init(&s->s_writers.counter[i], 0) < 0)
186 goto fail; 174 goto fail;
@@ -722,7 +710,8 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
722 make sure there are no rw files opened */ 710 make sure there are no rw files opened */
723 if (remount_ro) { 711 if (remount_ro) {
724 if (force) { 712 if (force) {
725 mark_files_ro(sb); 713 sb->s_readonly_remount = 1;
714 smp_wmb();
726 } else { 715 } else {
727 retval = sb_prepare_remount_readonly(sb); 716 retval = sb_prepare_remount_readonly(sb);
728 if (retval) 717 if (retval)