[PATCH] ext4: fix error code in ext4_commit_super

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should set the error code when ext4_commit_super check argument
failed.

Signed-off-by: Fengnan Chang <changfengnan@xxxxxxxx>
---
 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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux