All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()
@ 2022-05-11 13:20 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2022-05-11 13:20 UTC (permalink / raw)
  To: Jaegeuk Kim, Daeho Jeong; +Cc: Chao Yu, linux-f2fs-devel, kernel-janitors

Return an error code if f2fs_iget() fails.  Currently it returns
success.

Fixes: 3d7ad9c30607 ("f2fs: change the current atomic write way")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 fs/f2fs/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 79d1a20fbda9..cd768fadfd67 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2047,6 +2047,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
 	pinode = f2fs_iget(inode->i_sb, fi->i_pino);
 	if (IS_ERR(pinode)) {
 		f2fs_up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
+		ret = PTR_ERR(pinode);
 		goto out;
 	}
 
-- 
2.35.1


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

end of thread, other threads:[~2022-05-12 16:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 13:20 [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write() Dan Carpenter
2022-05-11 13:20 ` [f2fs-dev] " Dan Carpenter
2022-05-11 16:46 ` Daeho Jeong
2022-05-11 16:46   ` [f2fs-dev] " Daeho Jeong via Linux-f2fs-devel
2022-05-11 17:37 ` Jaegeuk Kim
2022-05-11 17:37   ` [f2fs-dev] " Jaegeuk Kim
2022-05-12  9:20   ` Dan Carpenter
2022-05-12  9:20     ` [f2fs-dev] " Dan Carpenter
2022-05-12 16:15     ` Jaegeuk Kim
2022-05-12 16:15       ` [f2fs-dev] " Jaegeuk Kim

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.