summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-04 17:06:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-10-24 23:43:26 -0400
commite2fec7c35582e7bb41cccc1761faa2af4dc17627 (patch)
tree9240558de77550f41b034d2ced5e08927f0800a5
parentb70a80e7a133a0c86f2fa078e7c144597c516415 (diff)
make freeing super_block rcu-delayed
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/super.c2
-rw-r--r--include/linux/fs.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index efa6e488a95c..743bb7118053 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -149,7 +149,7 @@ static void destroy_super(struct super_block *s)
WARN_ON(!list_empty(&s->s_mounts));
kfree(s->s_subtype);
kfree(s->s_options);
- kfree(s);
+ kfree_rcu(s, rcu);
}
/**
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b09e4e1d747a..2ab8a67ee054 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1330,6 +1330,7 @@ struct super_block {
*/
struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
+ struct rcu_head rcu;
};
extern struct timespec current_fs_time(struct super_block *sb);