All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/ocfs2: remove redundant ret variable
@ 2022-01-12  8:14 ` cgel.zte--- via Ocfs2-devel
  0 siblings, 0 replies; 9+ messages in thread
From: cgel.zte @ 2022-01-12  8:14 UTC (permalink / raw)
  To: mark
  Cc: jlbec, joseph.qi, ocfs2-devel, linux-kernel, Minghao Chi,
	Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from ocfs2_add_clusters_in_btree() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 fs/ocfs2/file.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index fc5f780fa235..9a46dcef448c 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -540,15 +540,11 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb,
 			 struct ocfs2_alloc_context *meta_ac,
 			 enum ocfs2_alloc_restarted *reason_ret)
 {
-	int ret;
 	struct ocfs2_extent_tree et;
 
-	ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), fe_bh);
-	ret = ocfs2_add_clusters_in_btree(handle, &et, logical_offset,
+	return ocfs2_add_clusters_in_btree(handle, &et, logical_offset,
 					  clusters_to_add, mark_unwritten,
 					  data_ac, meta_ac, reason_ret);
-
-	return ret;
 }
 
 static int ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
-- 
2.25.1


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

end of thread, other threads:[~2022-01-24  2:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  8:14 [PATCH] fs/ocfs2: remove redundant ret variable cgel.zte
2022-01-12  8:14 ` [Ocfs2-devel] " cgel.zte--- via Ocfs2-devel
2022-01-12 11:19 ` Joseph Qi
2022-01-12 11:19   ` [Ocfs2-devel] " Joseph Qi via Ocfs2-devel
2022-01-23 14:13 ` [fs/ocfs2] 32e1a3dbeb: kernel_BUG_at_fs/ocfs2/uptodate.c kernel test robot
2022-01-23 14:13   ` kernel test robot
2022-01-24  2:34   ` Joseph Qi
2022-01-24  2:34     ` Joseph Qi
2022-01-24  2:34     ` [Ocfs2-devel] " Joseph Qi via Ocfs2-devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.