All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: remove redundant parameter judgment
@ 2022-03-14  7:15 Wang Xiaojun via Linux-f2fs-devel
  2022-03-15  7:47 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Xiaojun via Linux-f2fs-devel @ 2022-03-14  7:15 UTC (permalink / raw)
  To: chao, jaegeuk; +Cc: linux-f2fs-devel

iput() has already judged the incoming parameter, so there is
no need to repeat the judgment here.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
---
 fs/f2fs/namei.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 5f213f05556d..b7c9b602bd72 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -1107,8 +1107,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
 out_old:
 	f2fs_put_page(old_page, 0);
 out:
-	if (whiteout)
-		iput(whiteout);
+	iput(whiteout);
 	return err;
 }
 
-- 
2.26.0.106.g9fadedd



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

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

* Re: [f2fs-dev] [PATCH] f2fs: remove redundant parameter judgment
  2022-03-14  7:15 [f2fs-dev] [PATCH] f2fs: remove redundant parameter judgment Wang Xiaojun via Linux-f2fs-devel
@ 2022-03-15  7:47 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2022-03-15  7:47 UTC (permalink / raw)
  To: Wang Xiaojun, jaegeuk; +Cc: linux-f2fs-devel

On 2022/3/14 15:15, Wang Xiaojun via Linux-f2fs-devel wrote:
> iput() has already judged the incoming parameter, so there is
> no need to repeat the judgment here.
> 
> Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
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-03-15  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14  7:15 [f2fs-dev] [PATCH] f2fs: remove redundant parameter judgment Wang Xiaojun via Linux-f2fs-devel
2022-03-15  7:47 ` Chao Yu

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.