xfs: introduce protection for drop nlink
authorCheng Lin <cheng.lin130@zte.com.cn>
Tue, 10 Oct 2023 02:09:01 +0000 (10:09 +0800)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 23 Oct 2023 05:34:47 +0000 (11:04 +0530)
commit2b99e410b28f5a75ae417e6389e767c7745d6fce
treebeaf6a19b63d05c585d731f76aa1740dca2b7843
parent9fa8753aa1f177dfb859ee22daed47c337c84278
xfs: introduce protection for drop nlink

When abnormal drop_nlink are detected on the inode,
return error, to avoid corruption propagation.

Signed-off-by: Cheng Lin <cheng.lin130@zte.com.cn>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/xfs_inode.c