All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] ext4: Remove redundant o_start statements
@ 2021-12-08  7:51 cgel.zte
  2022-01-06  4:41 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-08  7:51 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Andreas Dilger, linux-ext4, linux-kernel, luo penghao, Zeal Robot

From: luo penghao <luo.penghao@zte.com.cn>

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>
---
 fs/ext4/move_extent.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 64a5797..95aa212 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -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;
 			}
-- 
2.15.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] ext4: Remove redundant o_start statements
  2021-12-08  7:51 [PATCH linux-next] ext4: Remove redundant o_start statements cgel.zte
@ 2022-01-06  4:41 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-01-06  4:41 UTC (permalink / raw)
  To: cgel.zte
  Cc: Theodore Ts'o, Andreas Dilger, linux-kernel, linux-ext4,
	luo penghao, Zeal Robot

On Wed, 8 Dec 2021 07:51:57 +0000, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
> 
> 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:
> 
> [...]

Applied, thanks!

[1/1] ext4: Remove redundant o_start statements
      commit: b687e7ba0849122bf862639b98256a0b984a940a

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-06  4:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08  7:51 [PATCH linux-next] ext4: Remove redundant o_start statements cgel.zte
2022-01-06  4:41 ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.