projects
/
unionfs-odf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e6eeac
)
Unionfs: debugging: don't oops if sb->s_root is NULL
author
Erez_Zadok
<ezk@cs.sunysb.edu>
Fri, 16 Nov 2007 18:47:07 +0000
(13:47 -0500)
committer
Rachita Kothiyal
<rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:02:57 +0000
(19:02 -0400)
If we're calling show_branch_counts very early during mount or late during
unmount, don't oops if the s_root is already NULL.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/debug.c
patch
|
blob
|
history
diff --git
a/fs/unionfs/debug.c
b/fs/unionfs/debug.c
index 424c60d650b4dd3efc5577b5e8d59a6b36861c12..94f0e84c0b0b0477fa34388fd27314484feb145b 100644
(file)
--- a/
fs/unionfs/debug.c
+++ b/
fs/unionfs/debug.c
@@
-416,7
+416,10
@@
void __show_branch_counts(const struct super_block *sb,
printk("BC:");
for (i=0; i<sbmax(sb); i++) {
- mnt = UNIONFS_D(sb->s_root)->lower_paths[i].mnt;
+ if (sb->s_root)
+ mnt = UNIONFS_D(sb->s_root)->lower_paths[i].mnt;
+ else
+ mnt = NULL;
printk("%d:", (mnt ? atomic_read(&mnt->mnt_count) : -99));
}
printk("%s:%s:%d\n",file,fxn,line);