aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-10-01 10:28:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-10-01 10:28:11 -0700
commit517bf8fc211d37d3aa005fb35f9ee7f1d35cb860 (patch)
treef4e16b5e97382f935113e322527133e86a126969
parent77c4ad8e231ae8b31cbde28f1e4a2c00df3bc238 (diff)
parentc2d22ecd3cf3c49aeecdc10ffd7af10ec1f7eab6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs lru leak fix from Al Viro: "The fix in "super: fix for destroy lrus" didn't - they need to be destroyed, all right, but that's the wrong place..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/super.c: fix lru_list leak for real
-rw-r--r--fs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index 3a96c9783a8..0225c20f877 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -264,6 +264,8 @@ out_free_sb:
*/
static inline void destroy_super(struct super_block *s)
{
+ list_lru_destroy(&s->s_dentry_lru);
+ list_lru_destroy(&s->s_inode_lru);
#ifdef CONFIG_SMP
free_percpu(s->s_files);
#endif
@@ -323,8 +325,6 @@ void deactivate_locked_super(struct super_block *s)
/* caches are now gone, we can safely kill the shrinker now */
unregister_shrinker(&s->s_shrink);
- list_lru_destroy(&s->s_dentry_lru);
- list_lru_destroy(&s->s_inode_lru);
put_filesystem(fs);
put_super(s);