From 39bee2e6acc2522d88feb324b18178b34cb7b75a Mon Sep 17 00:00:00 2001 From: Sergey Shtylyov Date: Tue, 20 Dec 2022 20:17:32 +0300 Subject: [PATCH] f2fs: file: drop useless initializer in expand_inode_data() In expand_inode_data(), the 'new_size' local variable is initialized to the result of i_size_read(), however this value isn't ever used, so we can drop this initializer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ecbc8c135b49..6426b50b70b8 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1697,7 +1697,7 @@ static int expand_inode_data(struct inode *inode, loff_t offset, .err_gc_skipped = true, .nr_free_secs = 0 }; pgoff_t pg_start, pg_end; - loff_t new_size = i_size_read(inode); + loff_t new_size; loff_t off_end; block_t expanded = 0; int err; -- 2.25.1