[PATCH 03/13] ext4: correct return value of ext4_convert_meta_bg

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

 



We return error in "ret", so collect previous error in "ret" instead
of "err" or previous error will be ignored.

Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
---
 fs/ext4/resize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 7cbc695b7005..0b3d8c808de1 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1984,8 +1984,8 @@ static int ext4_convert_meta_bg(struct super_block *sb, struct inode *inode)
 
 errout:
 	ret = ext4_journal_stop(handle);
-	if (!err)
-		err = ret;
+	if (!ret)
+		ret = err;
 	return ret;
 
 invalid_resize_inode:
-- 
2.30.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