f2fs: fix to check return value of f2fs_recover_xattr_data
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Tue, 12 Dec 2023 02:15:27 +0000 (10:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:37 +0000 (15:35 -0800)
commitcf8a10d41f1328f2ca3f44ef9680cb665274a148
tree340f2a76ac219e1d82dc918198d769be3570b08a
parent0c5d08b1c98e5dbb0cf56cb99c45adec887790ce
f2fs: fix to check return value of f2fs_recover_xattr_data

[ Upstream commit 86d7d57a3f096c8349b32a0cd5f6f314e4416a6d ]

Should check return value of f2fs_recover_xattr_data in
__f2fs_setxattr rather than doing invalid retry if error happen.

Also just do set_page_dirty in f2fs_recover_xattr_data when
page is changed really.

Fixes: 50a472bbc79f ("f2fs: do not return EFSCORRUPTED, but try to run online repair")
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/node.c
fs/f2fs/xattr.c