Skip to content

Commit

Permalink
dentry leak in simple_fill_super() failure exit
Browse files Browse the repository at this point in the history
d_genocide() does _not_ evict dentries; it just removes extra ref
pinning each of those.  Normally it's followed by shrinking the
tree (it's done just before generic_shutdown_super() by kill_litter_super()),
but in case of simple_fill_super() nothing of that kind will follow.
Just do shrink_dcache_parent() manually.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 9, 2012
1 parent c65390f commit 640946f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
return 0;
out:
d_genocide(root);
shrink_dcache_parent(root);
dput(root);
return -ENOMEM;
}
Expand Down

0 comments on commit 640946f

Please sign in to comment.