[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080708095700.3d46bdfa@infradead.org>
Date: Tue, 8 Jul 2008 09:57:00 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Arjan van de Ven <arjan@...radead.org>,
linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, mingo@...e.hu
Subject: [patch 17/17] Use WARN() in fs/proc/
From: Arjan van de Ven <arjan@...ux.intel.com>
Subject: Use WARN() instead of printk+WARN_ON() in fs/procfs
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 VenIndex: linux.trees.git/fs/proc/generic.c
===================================================================
---
fs/proc/generic.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Index: linux.trees.git/fs/proc/generic.c
===================================================================
--- linux.trees.git.orig/fs/proc/generic.c
+++ linux.trees.git/fs/proc/generic.c
@@ -792,12 +792,9 @@ continue_removing:
if (S_ISDIR(de->mode))
parent->nlink--;
de->nlink = 0;
- if (de->subdir) {
- printk(KERN_WARNING "%s: removing non-empty directory "
+ WARN(de->subdir, 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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists