From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Daeho Jeong <daehojeong@google.com>
Cc: kernel-janitors@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()
Date: Wed, 11 May 2022 16:20:08 +0300 [thread overview]
Message-ID: <Ynu4CGiqiU4l2vdf@kili> (raw)
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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2022-05-11 13:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 13:20 Dan Carpenter [this message]
2022-05-11 16:46 ` [f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write() Daeho Jeong via Linux-f2fs-devel
2022-05-11 17:37 ` Jaegeuk Kim
2022-05-12 9:20 ` Dan Carpenter
2022-05-12 16:15 ` Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ynu4CGiqiU4l2vdf@kili \
--to=dan.carpenter@oracle.com \
--cc=daehojeong@google.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).