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>
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);