Skip to content

Commit

Permalink
ext4: remove unneeded variable in ext4_xattr_check_block()
Browse files Browse the repository at this point in the history
We could return directly from ext4_xattr_check_block(). Thus, we
shouldn't need to define a 'error' variable.

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 Feb 20, 2012
1 parent 661aa52 commit f1b3a2a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ext4/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,10 @@ ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end)
static inline int
ext4_xattr_check_block(struct buffer_head *bh)
{
int error;

if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) ||
BHDR(bh)->h_blocks != cpu_to_le32(1))
return -EIO;
error = ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size);
return error;
return ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size);
}

static inline int
Expand Down

0 comments on commit f1b3a2a

Please sign in to comment.