Skip to contentSkip to conversation

ext4: remove useless resetting io_end_size in mpage_process_page()

PATCH Applied Nghia Le 2 participants 2 messages Oct 25, 2021 – Jan 5, 2022

Subsystems (2)
lore
Share & tools
lore

Nghia Le

author
#0 lore raw

PATCH 1/1 ext4: remove useless resetting io_end_size in mpage_process_page()

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.

---
 fs/ext4/inode.c | 2 --
 1 file changed, 2 deletions(-)
fs/ext4/inode.c +0 -2
index 0f06305167d5..03efed2ed1ea 100644
@@ -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;
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Nghia Le

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,

Signature · 1 line
Theodore Ts'o <[email protected]>