summaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-03 01:22:25 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-04-09 07:39:22 +0200
commit640946f20390e492694f9d7470656f2262385951 (patch)
treefb79454083149c59bd25ca09eab96b7028d3299f /fs/libfs.c
parentfix breakage in mtdchar_open(), sanitize failure exits (diff)
downloadlinux-640946f20390e492694f9d7470656f2262385951.tar.xz
linux-640946f20390e492694f9d7470656f2262385951.zip
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index 358094f0433d..18d08f5db53a 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;
}