public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] proc: use BUG_ON() in de_put()
@ 2007-11-15 16:12 Alexey Dobriyan
  2007-11-16 21:46 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2007-11-15 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, devel

It's much more visible that some printk. I still has an unexplained oops
in proc, so let's leave it for a while.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 fs/proc/inode.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -37,12 +37,7 @@ void de_put(struct proc_dir_entry *de)
 {
 	if (de) {	
 		lock_kernel();		
-		if (!atomic_read(&de->count)) {
-			printk("de_put: entry %s already free!\n", de->name);
-			unlock_kernel();
-			return;
-		}
-
+		BUG_ON(atomic_read(&de->count) == 0);
 		if (atomic_dec_and_test(&de->count)) {
 			if (de->deleted) {
 				printk("de_put: deferred delete of %s\n",


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-22  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 16:12 [PATCH] proc: use BUG_ON() in de_put() Alexey Dobriyan
2007-11-16 21:46 ` Andrew Morton
2007-11-22  8:49   ` Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox