]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: turn the XFS_DA_OP_REPLACE checks in xfs_attr_shortform_addname into asserts
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2024 23:07:44 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:26 +0000 (14:06 -0700)
commit5ef5d3286beb5f54fdf86d02e67ec73f815e5fa0
tree4e8640b9a28c7e9ad52f2cea8e4769c94e7bcec3
parentfcff0528e864358c7aa1f86ace157f19fad761ce
xfs: turn the XFS_DA_OP_REPLACE checks in xfs_attr_shortform_addname into asserts

Source kernel commit: 378b6aef9de0f7c3d0de309ecc61c11eb29e57da

Since commit deed9512872d ("xfs: Check for -ENOATTR or -EEXIST"), the
high-level attr code does a lookup for any attr we're trying to set,
and does the checks to handle the create vs replace cases, which thus
never hit the low-level attr code.

Turn the checks in xfs_attr_shortform_addname as they must never trip.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
libxfs/xfs_attr.c