Commit a1954bff authored by Chandan Babu R's avatar Chandan Babu R Committed by Zheng Zengkai
Browse files

xfs: Check for extent overflow when trivally adding a new extent

mainline inclusion
from mainline-v5.12-rc1
commit 727e1acd
category: bugfix
bugzilla: 187510,https://gitee.com/openeuler/kernel/issues/I4KIAO

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=727e1acd297cae15449607d6e2ee39c71216cf1a



--------------------------------

When adding a new data extent (without modifying an inode's existing
extents) the extent count increases only by 1. This commit checks for
extent count overflow in such cases.

Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAllison Henderson <allison.henderson@oracle.com>
Signed-off-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>

Conflict: commit 3de4eb10 ("xfs: allow reservation of rtblocks with
xfs_trans_alloc_inode") is backported already, which introduce some
conflicts on code context.
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarGuo Xuenan <guoxuenan@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 6807d3e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment