diff options
| author | Zhiguo Niu <zhiguo.niu@unisoc.com> | 2023-12-12 05:15:27 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-26 02:35:37 +0300 |
| commit | cf8a10d41f1328f2ca3f44ef9680cb665274a148 (patch) | |
| tree | 340f2a76ac219e1d82dc918198d769be3570b08a /fs/f2fs/node.c | |
| parent | 0c5d08b1c98e5dbb0cf56cb99c45adec887790ce (diff) | |
| download | linux-cf8a10d41f1328f2ca3f44ef9680cb665274a148.tar.xz | |
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>
Diffstat (limited to 'fs/f2fs/node.c')
| -rw-r--r-- | fs/f2fs/node.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 8b30f11f37b4..9e00932770d8 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2751,11 +2751,11 @@ recover_xnid: f2fs_update_inode_page(inode); /* 3: update and set xattr node page dirty */ - if (page) + if (page) { memcpy(F2FS_NODE(xpage), F2FS_NODE(page), VALID_XATTR_BLOCK_SIZE); - - set_page_dirty(xpage); + set_page_dirty(xpage); + } f2fs_put_page(xpage, 1); return 0; |
