Skip to content

Commit 6e3d6ca

Browse files
Julia Lawalljankara
authored andcommitted
fs/ext2/balloc.c: delete useless initialization
Delete nontrivial initialization that is immediately overwritten by the result of an allocation function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; identifier i; expression e; @@ ( T i = \(0\|NULL\|ERR_PTR(...)\); | -T i = e; +T i; ) ... when != i i = \(kzalloc\|kcalloc\|kmalloc\)(...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 1cde201 commit 6e3d6ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ext2/balloc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static inline int rsv_is_empty(struct ext2_reserve_window *rsv)
421421
void ext2_init_block_alloc_info(struct inode *inode)
422422
{
423423
struct ext2_inode_info *ei = EXT2_I(inode);
424-
struct ext2_block_alloc_info *block_i = ei->i_block_alloc_info;
424+
struct ext2_block_alloc_info *block_i;
425425
struct super_block *sb = inode->i_sb;
426426

427427
block_i = kmalloc(sizeof(*block_i), GFP_NOFS);

0 commit comments

Comments
 (0)