From 1489cef156c1a9c942b3551943a86924c1d5ddc7 Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Mon, 16 Jul 2007 23:40:07 -0400 Subject: [PATCH] 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 --- fs/unionfs/debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index 424c60d650b..94f0e84c0b0 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; is_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); -- 2.34.1