Skip to content

Commit

Permalink
Ext2: remove the overhead check about sb in the function ext2_new_blocks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Shilong authored and Jan Kara committed Feb 6, 2013
1 parent 288be96 commit 98783e4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fs/ext2/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 98783e4

Please sign in to comment.