Skip to content

Commit

Permalink
ext4: cleanup in ext4_discard_allocated_blocks()
Browse files Browse the repository at this point in the history
remove 'len' variable in ext4_discard_allocated_blocks() because it is
useless.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Zheng Liu authored and Theodore Ts'o committed May 28, 2012
1 parent 2cde417 commit 400db9d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3073,13 +3073,9 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
static void ext4_discard_allocated_blocks(struct ext4_allocation_context *ac)
{
struct ext4_prealloc_space *pa = ac->ac_pa;
int len;

if (pa && pa->pa_type == MB_INODE_PA) {
len = ac->ac_b_ex.fe_len;
pa->pa_free += len;
}

if (pa && pa->pa_type == MB_INODE_PA)
pa->pa_free += ac->ac_b_ex.fe_len;
}

/*
Expand Down

0 comments on commit 400db9d

Please sign in to comment.