summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_attr_item.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-05-22 15:59:48 +1000
committerDave Chinner <david@fromorbit.com>2022-05-22 15:59:48 +1000
commite2c78949b641d34cb4051b32c2fa5e03a4bfef35 (patch)
tree6f1f631571c60a88b9ef410d67787a0ed8b0f73c /fs/xfs/xfs_attr_item.c
parentb53d212b4b5c29ab16edb7eca2b0e05927b7aa34 (diff)
xfs: use a separate slab cache for deferred xattr work state
Create a separate slab cache for struct xfs_attr_item objects, since we can pack the (104-byte) intent items more tightly than we can with the general slab cache objects. On x86, this means 39 intents per memory page instead of 32. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_attr_item.c')
-rw-r--r--fs/xfs/xfs_attr_item.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c
index 5397b7894da0..f85bcbfc2478 100644
--- a/fs/xfs/xfs_attr_item.c
+++ b/fs/xfs/xfs_attr_item.c
@@ -404,7 +404,10 @@ xfs_attr_free_item(
{
if (attr->xattri_da_state)
xfs_da_state_free(attr->xattri_da_state);
- kmem_free(attr);
+ if (attr->xattri_da_args->op_flags & XFS_DA_OP_RECOVERY)
+ kmem_free(attr);
+ else
+ kmem_cache_free(xfs_attr_intent_cache, attr);
}
/* Process an attr. */