From: Fengnan Chang <changfengnan@vivo.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org
Cc: Fengnan Chang <changfengnan@vivo.com>
Subject: [PATCH] ext4: fix error code in ext4_commit_super
Date: Mon, 29 Mar 2021 11:57:59 +0800 [thread overview]
Message-ID: <20210329035800.648-1-changfengnan@vivo.com> (raw)
We should set the error code when ext4_commit_super check argument
failed.
Signed-off-by: Fengnan Chang <changfengnan@vivo.com>
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 03373471131c..5440b8ff86a8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5501,7 +5501,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
int error = 0;
if (!sbh || block_device_ejected(sb))
- return error;
+ return -EINVAL;
/*
* If the file system is mounted read-only, don't update the
--
2.29.0
next reply other threads:[~2021-03-29 4:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 3:57 Fengnan Chang [this message]
2021-04-02 3:32 ` 答复: [PATCH] ext4: fix error code in ext4_commit_super changfengnan
2021-04-02 7:58 ` Andreas Dilger
2021-04-02 8:43 ` 答复: " changfengnan
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=20210329035800.648-1-changfengnan@vivo.com \
--to=changfengnan@vivo.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).