[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111216141407.24668.58875.stgit@warthog.procyon.org.uk>
Date: Fri, 16 Dec 2011 14:14:07 +0000
From: David Howells <dhowells@...hat.com>
To: linux-arch@...r.kernel.org, mingo@...e.hu
Cc: linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>
Subject: [PATCH 2/7] Make shrink_dcache_for_umount_subtree() use
ANNOTATED_BUG()
Make shrink_dcache_for_umount_subtree() use ANNOTATED_BUG() rather than doing
printk() then BUG() so that the annotation appears _after_ the "cut here" line
instead of before it.
Signed-off-by: David Howells <dhowells@...hat.com>
---
fs/dcache.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 89509b5..4083c50 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -37,6 +37,7 @@
#include <linux/rculist_bl.h>
#include <linux/prefetch.h>
#include <linux/ratelimit.h>
+#include <linux/bug.h>
#include "internal.h"
/*
@@ -889,9 +890,9 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)
dentry_lru_prune(dentry);
__d_shrink(dentry);
- if (dentry->d_count != 0) {
- printk(KERN_ERR
- "BUG: Dentry %p{i=%lx,n=%s}"
+ if (unlikely(dentry->d_count != 0))
+ ANNOTATED_BUG(
+ "Dentry %p{i=%lx,n=%s}"
" still in use (%d)"
" [unmount of %s %s]\n",
dentry,
@@ -901,8 +902,6 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)
dentry->d_count,
dentry->d_sb->s_type->name,
dentry->d_sb->s_id);
- BUG();
- }
if (IS_ROOT(dentry)) {
parent = NULL;
--
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