From: Allison Collins Date: Tue, 15 Sep 2020 19:59:37 +0000 (-0400) Subject: xfs: Pull up trans roll in xfs_attr3_leaf_clearflag X-Git-Tag: v5.9.0-rc0~20 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e936ed7ac82ead0f82db87e58b355246b4a62916;p=thirdparty%2Fxfsprogs-dev.git xfs: Pull up trans roll in xfs_attr3_leaf_clearflag Source kernel commit: 1fc618d76266750230f19e4053f5422a58b84141 New delayed allocation routines cannot be handling transactions so pull them out into the calling functions Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index b3d556fb1..60cec71c5 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -709,6 +709,14 @@ xfs_attr_leaf_addname( * Added a "remote" value, just clear the incomplete flag. */ error = xfs_attr3_leaf_clearflag(args); + if (error) + return error; + + /* + * Commit the flag value change and start the next trans in + * series. + */ + error = xfs_trans_roll_inode(&args->trans, args->dp); } return error; } @@ -1067,6 +1075,14 @@ restart: error = xfs_attr3_leaf_clearflag(args); if (error) goto out; + + /* + * Commit the flag value change and start the next trans in + * series. + */ + error = xfs_trans_roll_inode(&args->trans, args->dp); + if (error) + goto out; } retval = error = 0; diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 082a2f5e7..a27107cc7 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -2779,10 +2779,7 @@ xfs_attr3_leaf_clearflag( XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); } - /* - * Commit the flag value change and start the next trans in series. - */ - return xfs_trans_roll_inode(&args->trans, args->dp); + return 0; } /*