Skip to contentSkip to conversation

gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage

PATCH New Bob Peterson 1 participant 1 message Dec 10, 2019 1 message not in the archive GFS2 file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage

Hi,

This patch simply removes variable ret, which is used to store the return code of its call to __gfs2_jdata_writepage, in favor of just returning the result directly.

---
 fs/gfs2/aops.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
fs/gfs2/aops.c +1 -3
index 9c6df721321a..ba83b49ce18c 100644
@@ -183,14 +183,12 @@ static int gfs2_jdata_writepage(struct page *page, struct writeback_control *wbc
 	struct inode *inode = page->mapping->host;
 	struct gfs2_inode *ip = GFS2_I(inode);
 	struct gfs2_sbd *sdp = GFS2_SB(inode);
-	int ret;
 
 	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
 		goto out;
 	if (PageChecked(page) || current->journal_info)
 		goto out_ignore;
-	ret = __gfs2_jdata_writepage(page, wbc);
-	return ret;
+	return __gfs2_jdata_writepage(page, wbc);
 
 out_ignore:
 	redirty_page_for_writepage(wbc, page);