Skip to content

Commit

Permalink
ext4: remove redundant o_start statement
Browse files Browse the repository at this point in the history
The if will goto out of the loop, and until the end of the
function execution, o_start will not be used again.

The clang_analyzer complains as follows:

fs/ext4/move_extent.c:635:5 warning:

Value stored to 'o_start' is never read

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
Link: https://lore.kernel.org/r/20211208075157.404535-1-luo.penghao@zte.com.cn
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
luo penghao authored and Theodore Ts'o committed Jan 10, 2022
1 parent 037e7c5 commit a6dbc76
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/ext4/move_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
/* Check hole before the start pos */
if (cur_blk + cur_len - 1 < o_start) {
if (next_blk == EXT_MAX_BLOCKS) {
o_start = o_end;
ret = -ENODATA;
goto out;
}
Expand Down

0 comments on commit a6dbc76

Please sign in to comment.