linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: fix error code in ext4_commit_super
@ 2021-03-29  3:57 Fengnan Chang
  2021-04-02  3:32 ` 答复: " changfengnan
  0 siblings, 1 reply; 4+ messages in thread
From: Fengnan Chang @ 2021-03-29  3:57 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4; +Cc: Fengnan Chang

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


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

end of thread, other threads:[~2021-04-02  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-29  3:57 [PATCH] ext4: fix error code in ext4_commit_super Fengnan Chang
2021-04-02  3:32 ` 答复: " changfengnan
2021-04-02  7:58   ` Andreas Dilger
2021-04-02  8:43     ` 答复: " changfengnan

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).