ext4: stop overwrite the errcode in ext4_setup_super
authoryangerkun <yangerkun@huawei.com>
Mon, 1 Jun 2020 07:34:04 +0000 (15:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:13 +0000 (17:49 +0200)
commit2f79d8ab7f717c6a5d2ec21d89fe686094ddc03e
treebcf2c3bdd6921be37357eeff66e67fd2b7caf13a
parent4e3f8bb50cd0dee2f74c91c557ef7cc7cc4fe440
ext4: stop overwrite the errcode in ext4_setup_super

[ Upstream commit 5adaccac46ea79008d7b75f47913f1a00f91d0ce ]

Now the errcode from ext4_commit_super will overwrite EROFS exists in
ext4_setup_super. Actually, no need to call ext4_commit_super since we
will return EROFS. Fix it by goto done directly.

Fixes: c89128a00838 ("ext4: handle errors on ext4_commit_super")
Signed-off-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200601073404.3712492-1-yangerkun@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/super.c