]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: Pull up trans roll in xfs_attr3_leaf_clearflag
authorAllison Collins <allison.henderson@oracle.com>
Tue, 15 Sep 2020 19:59:37 +0000 (15:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 15 Sep 2020 19:59:37 +0000 (15:59 -0400)
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 <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c
libxfs/xfs_attr_leaf.c

index b3d556fb184b444eff3806b4a50d9e9d024c928e..60cec71c5d1e8765fe091f8bf56da388507dc105 100644 (file)
@@ -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;
 
index 082a2f5e7c601cb3a7afe38b4cd4335feb294aaf..a27107cc7245feea925eaeb2a4cad0f95609d6a2 100644 (file)
@@ -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;
 }
 
 /*