[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220823075429.209135-1-ye.xingchen@zte.com.cn>
Date: Tue, 23 Aug 2022 07:54:29 +0000
From: cgel.zte@...il.com
To: agruenba@...hat.com, linux-kernel@...r.kernel.org
Cc: rpeterso@...hat.com, cluster-devel@...hat.com,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] gfs2: Remove the unneeded result variable
From: ye xingchen <ye.xingchen@....com.cn>
Return the value from gfs2_iomap_get() directly instead of storing it
in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
fs/gfs2/bmap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 3bdb2c668a71..977d53db2994 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -2462,8 +2462,6 @@ int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length)
static int gfs2_map_blocks(struct iomap_writepage_ctx *wpc, struct inode *inode,
loff_t offset)
{
- int ret;
-
if (WARN_ON_ONCE(gfs2_is_stuffed(GFS2_I(inode))))
return -EIO;
@@ -2472,8 +2470,7 @@ static int gfs2_map_blocks(struct iomap_writepage_ctx *wpc, struct inode *inode,
return 0;
memset(&wpc->iomap, 0, sizeof(wpc->iomap));
- ret = gfs2_iomap_get(inode, offset, INT_MAX, &wpc->iomap);
- return ret;
+ return gfs2_iomap_get(inode, offset, INT_MAX, &wpc->iomap);
}
const struct iomap_writeback_ops gfs2_writeback_ops = {
--
2.25.1
Powered by blists - more mailing lists