Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
[jsipek: no need to take a read lock on the superblock private data]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
{
int bindex, bstart, bend;
struct unionfs_sb_info *spd;
+ int leaks = 0;
spd = UNIONFS_SB(sb);
if (!spd)
/* 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);