Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Oct 1, 2013
2 parents 77c4ad8 + c2d22ec commit 517bf8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
*/
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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 517bf8f

Please sign in to comment.