[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11761304531397-git-send-email-jsipek@cs.sunysb.edu>
Date: Mon, 9 Apr 2007 10:53:57 -0400
From: "Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
To: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: akpm@...ux-foundation.org, Erez Zadok <ezk@...sunysb.edu>,
"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
Subject: [PATCH 06/21] Unionfs: Provide more helpful info on branch leaks during unmount
From: Erez Zadok <ezk@...sunysb.edu>
Signed-off-by: Erez Zadok <ezk@...sunysb.edu>
[jsipek: no need to take a read lock on the superblock private data]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>
---
fs/unionfs/super.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 571b589..037c47d 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -97,6 +97,7 @@ static void unionfs_put_super(struct super_block *sb)
{
int bindex, bstart, bend;
struct unionfs_sb_info *spd;
+ int leaks = 0;
spd = UNIONFS_SB(sb);
if (!spd)
@@ -107,7 +108,12 @@ static void unionfs_put_super(struct super_block *sb)
/* Make sure we have no leaks of branchget/branchput. */
for (bindex = bstart; bindex <= bend; bindex++)
- BUG_ON(branch_count(sb, bindex) != 0);
+ if (branch_count(sb, bindex) != 0) {
+ printk("unionfs: branch %d has %d references left!\n",
+ bindex, branch_count(sb,bindex));
+ leaks = 1;
+ }
+ BUG_ON(leaks != 0);
kfree(spd->data);
kfree(spd);
--
1.5.0.3.268.g3dda
-
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