Skip to content

Commit 1ef7729

Browse files
author
Darrick J. Wong
committed
xfs: reduce xfs_attr_try_sf_addname parameters
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>
1 parent bd3138e commit 1ef7729

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

fs/xfs/libxfs/xfs_attr.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,14 @@ xfs_attr_set_resv(
350350
*/
351351
STATIC int
352352
xfs_attr_try_sf_addname(
353-
struct xfs_inode *dp,
354353
struct xfs_da_args *args)
355354
{
356-
357355
int error;
358356

359357
/*
360358
* Build initial attribute list (if required).
361359
*/
362-
if (dp->i_af.if_format == XFS_DINODE_FMT_EXTENTS)
360+
if (args->dp->i_af.if_format == XFS_DINODE_FMT_EXTENTS)
363361
xfs_attr_shortform_create(args);
364362

365363
error = xfs_attr_shortform_addname(args);
@@ -371,9 +369,9 @@ xfs_attr_try_sf_addname(
371369
* NOTE: this is also the error path (EEXIST, etc).
372370
*/
373371
if (!error)
374-
xfs_trans_ichgtime(args->trans, dp, XFS_ICHGTIME_CHG);
372+
xfs_trans_ichgtime(args->trans, args->dp, XFS_ICHGTIME_CHG);
375373

376-
if (xfs_has_wsync(dp->i_mount))
374+
if (xfs_has_wsync(args->dp->i_mount))
377375
xfs_trans_set_sync(args->trans);
378376

379377
return error;
@@ -384,10 +382,9 @@ xfs_attr_sf_addname(
384382
struct xfs_attr_intent *attr)
385383
{
386384
struct xfs_da_args *args = attr->xattri_da_args;
387-
struct xfs_inode *dp = args->dp;
388385
int error = 0;
389386

390-
error = xfs_attr_try_sf_addname(dp, args);
387+
error = xfs_attr_try_sf_addname(args);
391388
if (error != -ENOSPC) {
392389
ASSERT(!error || error == -EEXIST);
393390
attr->xattri_dela_state = XFS_DAS_DONE;

0 commit comments

Comments
 (0)