GIT: unionfs2-2.6.27.y: Unionfs: debugging: don't oops if sb->s_root is NULL
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:46 EDT 2010
commit aa7c42e134520bb2f1c0290b10c40b8d0bbf2819
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Mon Jul 16 23:40:07 2007 -0400
Unionfs: debugging: don't oops if sb->s_root is NULL
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 at cs.sunysb.edu>
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index 424c60d..94f0e84 100644
--- 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);
More information about the unionfs-cvs
mailing list