Kaynağa Gözat

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>
Al Viro 13 yıl önce
ebeveyn
işleme
640946f203
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      fs/libfs.c

+ 1 - 0
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;
 }