Ext2: remove the overhead check about sb in the function ext2_new_blocks
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>
Wed, 6 Feb 2013 06:14:26 +0000 (14:14 +0800)
committerJan Kara <jack@suse.cz>
Wed, 6 Feb 2013 12:47:02 +0000 (13:47 +0100)
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>
fs/ext2/balloc.c

index 2616d0ea5c5c089aaa08007cb9d03e19f5a02258..ea88181932dfc9fe3678337d3992a02c9ebb9c36 100644 (file)
@@ -1239,10 +1239,6 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal,
 
        *errp = -ENOSPC;
        sb = inode->i_sb;
-       if (!sb) {
-               printk("ext2_new_blocks: nonexistent device");
-               return 0;
-       }
 
        /*
         * Check quota for allocation of this block.