]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: fix xfs_init_attr_trans not handling explicit operation codes
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:57 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:05 +0000 (17:01 -0700)
commitc8004ef526ca696854138acba24077dd124dda4f
tree76b474ef31250eef72c53458574fc364b26c444e
parentc72a686a604ad9f2701875d98a9464bdcb2efcdd
xfs: fix xfs_init_attr_trans not handling explicit operation codes

Source kernel commit: 06c37c719d22339ad09b93735923e9b1a9794871

When we were converting the attr code to use an explicit operation code
instead of keying off of attr->value being null, we forgot to change the
code that initializes the transaction reservation.  Split the function
into two helpers that handle the !remove and remove cases, then fix both
callsites to handle this correctly.

Fixes: c27411d4c640 ("xfs: make attr removal an explicit operation")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_attr.c
libxfs/xfs_attr.h