Skip to content

Commit 98783e4

Browse files
Wang Shilongjankara
authored andcommitted
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>
1 parent 288be96 commit 98783e4

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

fs/ext2/balloc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,10 +1239,6 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal,
12391239

12401240
*errp = -ENOSPC;
12411241
sb = inode->i_sb;
1242-
if (!sb) {
1243-
printk("ext2_new_blocks: nonexistent device");
1244-
return 0;
1245-
}
12461242

12471243
/*
12481244
* Check quota for allocation of this block.

0 commit comments

Comments
 (0)