Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Ext2: remove the overhead check about sb in the function ext2_new_blocks

It can be guranteed that inode->i_sb should not be null in vfs.
So here the check about it is overhead.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Wang Shilong and committed by
Jan Kara
98783e45 288be96d

-4
-4
fs/ext2/balloc.c
··· 1239 1239 1240 1240 *errp = -ENOSPC; 1241 1241 sb = inode->i_sb; 1242 - if (!sb) { 1243 - printk("ext2_new_blocks: nonexistent device"); 1244 - return 0; 1245 - } 1246 1242 1247 1243 /* 1248 1244 * Check quota for allocation of this block.