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>
This commit is contained in:
parent
99fcd77d15
commit
267e2a9c71
@ -806,12 +806,9 @@ continue_removing:
|
|||||||
if (S_ISDIR(de->mode))
|
if (S_ISDIR(de->mode))
|
||||||
parent->nlink--;
|
parent->nlink--;
|
||||||
de->nlink = 0;
|
de->nlink = 0;
|
||||||
if (de->subdir) {
|
WARN(de->subdir, KERN_WARNING "%s: removing non-empty directory "
|
||||||
printk(KERN_WARNING "%s: removing non-empty directory "
|
|
||||||
"'%s/%s', leaking at least '%s'\n", __func__,
|
"'%s/%s', leaking at least '%s'\n", __func__,
|
||||||
de->parent->name, de->name, de->subdir->name);
|
de->parent->name, de->name, de->subdir->name);
|
||||||
WARN_ON(1);
|
|
||||||
}
|
|
||||||
if (atomic_dec_and_test(&de->count))
|
if (atomic_dec_and_test(&de->count))
|
||||||
free_proc_entry(de);
|
free_proc_entry(de);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user