diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2012-02-20 17:53:05 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-02-20 17:53:05 -0500 |
commit | f1b3a2a75356ce9fdcbedd79d2bb0d1ca8ed9cee (patch) | |
tree | 00491f088a92bd95057d0befabfff7460edf0638 /fs/ext4 | |
parent | 661aa520577046192e50467b28c9c5726a8a9fb1 (diff) |
ext4: remove unneeded variable in ext4_xattr_check_block()
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/xattr.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 93a00d89a220..1bff752d1b59 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -158,13 +158,10 @@ ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end) | |||
158 | static inline int | 158 | static inline int |
159 | ext4_xattr_check_block(struct buffer_head *bh) | 159 | ext4_xattr_check_block(struct buffer_head *bh) |
160 | { | 160 | { |
161 | int error; | ||
162 | |||
163 | if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || | 161 | if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || |
164 | BHDR(bh)->h_blocks != cpu_to_le32(1)) | 162 | BHDR(bh)->h_blocks != cpu_to_le32(1)) |
165 | return -EIO; | 163 | return -EIO; |
166 | error = ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size); | 164 | return ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size); |
167 | return error; | ||
168 | } | 165 | } |
169 | 166 | ||
170 | static inline int | 167 | static inline int |