summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/proc/generic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index a36ad3c75cf4..f501f3211abc 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -777,7 +777,12 @@ continue_removing:
if (S_ISDIR(de->mode))
parent->nlink--;
de->nlink = 0;
- WARN_ON(de->subdir);
+ if (de->subdir) {
+ printk(KERN_WARNING "%s: removing non-empty directory "
+ "'%s/%s', leaking at least '%s'\n", __func__,
+ de->parent->name, de->name, de->subdir->name);
+ WARN_ON(1);
+ }
if (atomic_dec_and_test(&de->count))
free_proc_entry(de);
break;