Skip to content

Commit 1fc618d

Browse files
allisonhendersondjwong
authored andcommitted
xfs: Pull up trans roll in xfs_attr3_leaf_clearflag
New delayed allocation routines cannot be handling transactions so pull them out into the calling functions Signed-off-by: Allison Collins <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Chandan Rajendra <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Acked-by: Dave Chinner <[email protected]>
1 parent 7951410 commit 1fc618d

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,14 @@ xfs_attr_leaf_addname(
709709
* Added a "remote" value, just clear the incomplete flag.
710710
*/
711711
error = xfs_attr3_leaf_clearflag(args);
712+
if (error)
713+
return error;
714+
715+
/*
716+
* Commit the flag value change and start the next trans in
717+
* series.
718+
*/
719+
error = xfs_trans_roll_inode(&args->trans, args->dp);
712720
}
713721
return error;
714722
}
@@ -1067,6 +1075,14 @@ xfs_attr_node_addname(
10671075
error = xfs_attr3_leaf_clearflag(args);
10681076
if (error)
10691077
goto out;
1078+
1079+
/*
1080+
* Commit the flag value change and start the next trans in
1081+
* series.
1082+
*/
1083+
error = xfs_trans_roll_inode(&args->trans, args->dp);
1084+
if (error)
1085+
goto out;
10701086
}
10711087
retval = error = 0;
10721088

fs/xfs/libxfs/xfs_attr_leaf.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,10 +2782,7 @@ xfs_attr3_leaf_clearflag(
27822782
XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt)));
27832783
}
27842784

2785-
/*
2786-
* Commit the flag value change and start the next trans in series.
2787-
*/
2788-
return xfs_trans_roll_inode(&args->trans, args->dp);
2785+
return 0;
27892786
}
27902787

27912788
/*

0 commit comments

Comments
 (0)