Skip to contentSkip to conversation

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

PATCH In review Wang Shilong 1 participant 1 message Feb 6, 2013 ext2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Ext2: remove the overhead check about sb in the function ext2_new_blocks

From: Wang Shilong <[email protected]>

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

---
fs/ext2/balloc.c | 4 ----

1 file changed, 4 deletions(-)
fs/ext2/balloc.c +0 -0
index 1c36139..22993a0 100644
@@ -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.

Signature · 1 line
1.7.11.7