xfs: Pull up trans roll from xfs_attr3_leaf_setflag
authorAllison Collins <allison.henderson@oracle.com>
Tue, 21 Jul 2020 04:47:25 +0000 (21:47 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 29 Jul 2020 03:28:11 +0000 (20:28 -0700)
New delayed allocation routines cannot be handling transactions so
pull them up into the calling functions

Signed-off-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_attr_leaf.c

index 9e57409..d3ab32d 100644 (file)
@@ -1126,6 +1126,11 @@ xfs_attr_node_removename(
                error = xfs_attr3_leaf_setflag(args);
                if (error)
                        goto out;
+
+               error = xfs_trans_roll_inode(&args->trans, args->dp);
+               if (error)
+                       goto out;
+
                error = xfs_attr_rmtval_remove(args);
                if (error)
                        goto out;
index 906049d..7c72ff5 100644 (file)
@@ -2833,10 +2833,7 @@ xfs_attr3_leaf_setflag(
                         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;
 }
 
 /*