From: Dave Jones This looks awry. Move the dereference to after we have checked sb is non-NULL. Signed-off-by: Dave Jones Signed-off-by: Andrew Morton --- 25-akpm/fs/ext3/ialloc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN fs/ext3/ialloc.c~ext3-dreference-of-sb-preceeds-check fs/ext3/ialloc.c --- 25/fs/ext3/ialloc.c~ext3-dreference-of-sb-preceeds-check 2004-09-03 22:59:42.080169216 -0700 +++ 25-akpm/fs/ext3/ialloc.c 2004-09-03 22:59:42.083168760 -0700 @@ -97,7 +97,7 @@ void ext3_free_inode (handle_t *handle, unsigned long bit; struct ext3_group_desc * gdp; struct ext3_super_block * es; - struct ext3_sb_info *sbi = EXT3_SB(sb); + struct ext3_sb_info *sbi; int fatal = 0, err; if (atomic_read(&inode->i_count) > 1) { @@ -114,6 +114,7 @@ void ext3_free_inode (handle_t *handle, printk("ext3_free_inode: inode on nonexistent device\n"); return; } + sbi = EXT3_SB(sb); ino = inode->i_ino; ext3_debug ("freeing inode %lu\n", ino); _