linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove useless resetting io_end_size in mpage_process_page()
@ 2021-10-25 22:18 Nghia Le
  2022-01-05 23:39 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Nghia Le @ 2021-10-25 22:18 UTC (permalink / raw)
  To: tytso, adilger.kernel
  Cc: Nghia Le, linux-ext4, linux-kernel, lukas.bulwahn,
	kernel-janitors

The command "make clang-analyzer" detects dead stores in
mpage_process_page() function.

Do not reset io_end_size to 0 in the current paths, as the function
exits on those paths without further using io_end_size.

Signed-off-by: Nghia Le <nghialm78@gmail.com>
---
 fs/ext4/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0f06305167d5..03efed2ed1ea 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2260,7 +2260,6 @@ static int mpage_process_page(struct mpage_da_data *mpd, struct page *page,
 			mpd->map.m_len = 0;
 			mpd->map.m_flags = 0;
 			io_end_vec->size += io_end_size;
-			io_end_size = 0;
 
 			err = mpage_process_page_bufs(mpd, head, bh, lblk);
 			if (err > 0)
@@ -2285,7 +2284,6 @@ static int mpage_process_page(struct mpage_da_data *mpd, struct page *page,
 	} while (lblk++, (bh = bh->b_this_page) != head);
 
 	io_end_vec->size += io_end_size;
-	io_end_size = 0;
 	*map_bh = false;
 out:
 	*m_lblk = lblk;
-- 
2.25.1


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

* Re: [PATCH] ext4: remove useless resetting io_end_size in mpage_process_page()
  2021-10-25 22:18 [PATCH] ext4: remove useless resetting io_end_size in mpage_process_page() Nghia Le
@ 2022-01-05 23:39 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-01-05 23:39 UTC (permalink / raw)
  To: adilger.kernel, Nghia Le
  Cc: Theodore Ts'o, lukas.bulwahn, linux-ext4, linux-kernel,
	kernel-janitors

On Tue, 26 Oct 2021 05:18:03 +0700, Nghia Le wrote:
> The command "make clang-analyzer" detects dead stores in
> mpage_process_page() function.
> 
> Do not reset io_end_size to 0 in the current paths, as the function
> exits on those paths without further using io_end_size.
> 
> 
> [...]

Applied, thanks!

[1/1] ext4: remove useless resetting io_end_size in mpage_process_page()
      commit: 2e1a1101de1e37c80c750c2657cc35d7f560756c

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

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

end of thread, other threads:[~2022-01-05 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-25 22:18 [PATCH] ext4: remove useless resetting io_end_size in mpage_process_page() Nghia Le
2022-01-05 23:39 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).