linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: file: drop useless initializer in expand_inode_data()
@ 2022-12-20 17:17 Sergey Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2022-12-20 17:17 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel; +Cc: lvc-patches, lvc-project

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 <s.shtylyov@omp.ru>

---
This patch is against the 'dev' branch of Jaegeuk Kim's F2FS repo...
Reposting with ISP RAS mailing lists CC'ed now...

 fs/f2fs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: f2fs/fs/f2fs/file.c
===================================================================
--- f2fs.orig/fs/f2fs/file.c
+++ f2fs/fs/f2fs/file.c
@@ -1697,7 +1697,7 @@ static int expand_inode_data(struct inod
 			.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;


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* [f2fs-dev] [PATCH] f2fs: file: drop useless initializer in expand_inode_data()
@ 2022-12-19 20:07 Sergey Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2022-12-19 20:07 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel

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 <s.shtylyov@omp.ru>

---
This patch is against the 'dev' branch of Jaegeuk Kim's F2FS repo...

 fs/f2fs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: f2fs/fs/f2fs/file.c
===================================================================
--- f2fs.orig/fs/f2fs/file.c
+++ f2fs/fs/f2fs/file.c
@@ -1697,7 +1697,7 @@ static int expand_inode_data(struct inod
 			.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;


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2022-12-20 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20 17:17 [f2fs-dev] [PATCH] f2fs: file: drop useless initializer in expand_inode_data() Sergey Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2022-12-19 20:07 Sergey Shtylyov

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).