diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-05-21 23:02:01 -0700 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-05-27 15:55:52 +0530 |
commit | 97835e6866796874571646a1a8ff44f24c0b39f7 (patch) | |
tree | 9c4a7d078222b12c6ccb20cd249e9bdba23ba6cc /fs/xfs/libxfs/xfs_attr.h | |
parent | 2b3f004d3d518ec7a392066d935fd85c81412e33 (diff) | |
download | lwn-97835e6866796874571646a1a8ff44f24c0b39f7.tar.gz lwn-97835e6866796874571646a1a8ff44f24c0b39f7.zip |
xfs: fix xfs_init_attr_trans not handling explicit operation codes
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>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_attr.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.h b/fs/xfs/libxfs/xfs_attr.h index 088cb7b30168..0e51d0723f9a 100644 --- a/fs/xfs/libxfs/xfs_attr.h +++ b/fs/xfs/libxfs/xfs_attr.h @@ -565,8 +565,7 @@ bool xfs_attr_check_namespace(unsigned int attr_flags); bool xfs_attr_namecheck(unsigned int attr_flags, const void *name, size_t length); int xfs_attr_calc_size(struct xfs_da_args *args, int *local); -void xfs_init_attr_trans(struct xfs_da_args *args, struct xfs_trans_res *tres, - unsigned int *total); +struct xfs_trans_res xfs_attr_set_resv(const struct xfs_da_args *args); /* * Check to see if the attr should be upgraded from non-existent or shortform to |