[linux-safety] [PATCH] ext4/inode.c: remove dead stores in mpage_process_page()

"Nghia Le" <[email protected]> Thu, 21 Oct 2021 07:49:14 +0700
Newsgroups tech.elisa.lists.linux-safety
Message-ID <20211021004914.lbiN6r9pb2A_m1f0V8KMK31Iu81EBq4rqIrzAdTdOP0@z>
The command "make clang-analyzer" detected dead stores.

Removed the all the assignments io_end_size=0 to fix dead stores, as
io_end_size is never read.

Signed-off-by: Nghia Le <[email protected]>
---
 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



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#252): https://lists.elisa.tech/g/linux-safety/message/252
Mute This Topic: https://lists.elisa.tech/mt/86480121/5278000
Group Owner: [email protected]
Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-