]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: reduce xfs_attr_try_sf_addname parameters
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:34 +0000 (09:27 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:34 +0000 (09:27 -0800)
The dp parameter to this function is an alias of args->dp, so remove it
for clarity before we go adding new callers.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_attr.c

index 9e6b18d6ae00374b87e4308c62c0204628221a1d..9a5402d1e9bfa1405959ca5a0738190c10d28bb3 100644 (file)
@@ -350,16 +350,14 @@ xfs_attr_set_resv(
  */
 STATIC int
 xfs_attr_try_sf_addname(
-       struct xfs_inode        *dp,
        struct xfs_da_args      *args)
 {
-
        int                     error;
 
        /*
         * Build initial attribute list (if required).
         */
-       if (dp->i_af.if_format == XFS_DINODE_FMT_EXTENTS)
+       if (args->dp->i_af.if_format == XFS_DINODE_FMT_EXTENTS)
                xfs_attr_shortform_create(args);
 
        error = xfs_attr_shortform_addname(args);
@@ -371,9 +369,9 @@ xfs_attr_try_sf_addname(
         * NOTE: this is also the error path (EEXIST, etc).
         */
        if (!error)
-               xfs_trans_ichgtime(args->trans, dp, XFS_ICHGTIME_CHG);
+               xfs_trans_ichgtime(args->trans, args->dp, XFS_ICHGTIME_CHG);
 
-       if (xfs_has_wsync(dp->i_mount))
+       if (xfs_has_wsync(args->dp->i_mount))
                xfs_trans_set_sync(args->trans);
 
        return error;
@@ -384,10 +382,9 @@ xfs_attr_sf_addname(
        struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
-       struct xfs_inode                *dp = args->dp;
        int                             error = 0;
 
-       error = xfs_attr_try_sf_addname(dp, args);
+       error = xfs_attr_try_sf_addname(args);
        if (error != -ENOSPC) {
                ASSERT(!error || error == -EEXIST);
                attr->xattri_dela_state = XFS_DAS_DONE;