Re: [PATCH 03/17] xfs: use xfs_attr_defer_parent for calling xfs_attr_set on pptrs

Christoph Hellwig
2024-04-16T05:29:25Z

On Mon, Apr 15, 2024 at 06:36:43PM -0700, Darrick J. Wong wrote:
> + if (args->attr_filter & XFS_ATTR_PARENT)
> + xfs_attr_defer_parent(args,
> + XFS_ATTR_DEFER_REMOVE);
> + else
> + xfs_attr_defer_add(args, XFS_ATTR_DEFER_REMOVE);

> + if (args->attr_filter & XFS_ATTR_PARENT)
> + xfs_attr_defer_parent(args, XFS_ATTR_DEFER_REPLACE);
> + else
> + xfs_attr_defer_add(args, XFS_ATTR_DEFER_REPLACE);

> + if (args->attr_filter & XFS_ATTR_PARENT)
> + xfs_attr_defer_parent(args, XFS_ATTR_DEFER_SET);
> + else
> + xfs_attr_defer_add(args, XFS_ATTR_DEFER_SET);

Given how xfs_attr_defer_add/xfs_attr_defer_parent are basically
duplicates except for setting op_flags, shouldn't this move into
xfs_attr_defer_add?