aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-07-25 22:45:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:08 -0400
commit267e2a9c71b8e088ac307f9549f71468e86e26c1 (patch)
treea2fc7be0ee2d712841b4564abf4e63d814642ec3
parent99fcd77d15357e8ba51005c25cc750b9c28b2688 (diff)
Use WARN() in fs/proc/
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. This way, the entire if() {} section can collapse into the WARN() as well. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/generic.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index bc0a0dd2d844..cb4096cc3fb7 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -806,12 +806,9 @@ continue_removing:
806 if (S_ISDIR(de->mode)) 806 if (S_ISDIR(de->mode))
807 parent->nlink--; 807 parent->nlink--;
808 de->nlink = 0; 808 de->nlink = 0;
809 if (de->subdir) { 809 WARN(de->subdir, KERN_WARNING "%s: removing non-empty directory "
810 printk(KERN_WARNING "%s: removing non-empty directory "
811 "'%s/%s', leaking at least '%s'\n", __func__, 810 "'%s/%s', leaking at least '%s'\n", __func__,
812 de->parent->name, de->name, de->subdir->name); 811 de->parent->name, de->name, de->subdir->name);
813 WARN_ON(1);
814 }
815 if (atomic_dec_and_test(&de->count)) 812 if (atomic_dec_and_test(&de->count))
816 free_proc_entry(de); 813 free_proc_entry(de);
817} 814}