From: Al Viro Date: Mon, 2 Apr 2012 23:22:25 +0000 (-0400) Subject: dentry leak in simple_fill_super() failure exit X-Git-Tag: upstream/snapshot3+hdmi~7716^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=640946f20390e492694f9d7470656f2262385951;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git dentry leak in simple_fill_super() failure exit 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 --- diff --git a/fs/libfs.c b/fs/libfs.c index 358094f..18d08f5 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -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; }