]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: return corresponding errcode if xfs_initialize_perag() fail
authorYu Kuai <yukuai3@huawei.com>
Wed, 18 Nov 2020 17:21:26 +0000 (09:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:29:18 +0000 (13:29 +0100)
commitad3c4c96bfb719dcfdb422d4cc775107e70fe312
tree286a84d3a57e497eedae26151f2583f61aa4189b
parent738ec767062404fa21f96e7d92ea0eefd064e45b
xfs: return corresponding errcode if xfs_initialize_perag() fail

[ Upstream commit 595189c25c28a55523354336bf24453242c81c15 ]

In xfs_initialize_perag(), if kmem_zalloc(), xfs_buf_hash_init(), or
radix_tree_preload() failed, the returned value 'error' is not set
accordingly.

Reported-as-fixing: 8b26c5825e02 ("xfs: handle ENOMEM correctly during initialisation of perag structures")
Fixes: 9b2471797942 ("xfs: cache unlinked pointers in an rhashtable")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_mount.c