]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ext4: remove redundant o_start statement
authorluo penghao <luo.penghao@zte.com.cn>
Wed, 8 Dec 2021 07:51:57 +0000 (07:51 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Jan 2022 18:25:56 +0000 (13:25 -0500)
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>
fs/ext4/move_extent.c

index 64a579734f934a9ffdcd4a36076cc1ef2bbe1dbb..95aa212f08632dc1eacc17d98988be7edb5cdb8b 100644 (file)
@@ -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;
                        }