]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: Reverse apply 72b97ea40d
authorAllison Henderson <allison.henderson@oracle.com>
Mon, 12 Jul 2021 21:57:20 +0000 (14:57 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 28 Jul 2021 21:12:10 +0000 (14:12 -0700)
Source kernel commit: 4126c06e25b38842a254b2de6ffc3019a7b2f0ca

Originally we added this patch to help modularize the attr code in
preparation for delayed attributes and the state machine it requires.
However, later reviews found that this slightly alters the transaction
handling as the helper function is ambiguous as to whether the
transaction is diry or clean.  This may cause a dirty transaction to be
included in the next roll, where previously it had not.  To preserve the
existing code flow, we reverse apply this commit.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_attr.c

index dce7ded5cb1ed769f83716b12a3285c7250c0fe9..1c60bddd5a5290c0e3d60cc516c1b7fa5340b659 100644 (file)
@@ -1214,24 +1214,6 @@ int xfs_attr_node_removename_setup(
        return 0;
 }
 
-STATIC int
-xfs_attr_node_remove_rmt(
-       struct xfs_da_args      *args,
-       struct xfs_da_state     *state)
-{
-       int                     error = 0;
-
-       error = xfs_attr_rmtval_remove(args);
-       if (error)
-               return error;
-
-       /*
-        * Refill the state structure with buffers, the prior calls released our
-        * buffers.
-        */
-       return xfs_attr_refillstate(state);
-}
-
 /*
  * Remove a name from a B-tree attribute list.
  *
@@ -1260,7 +1242,15 @@ xfs_attr_node_removename(
         * overflow the maximum size of a transaction and/or hit a deadlock.
         */
        if (args->rmtblkno > 0) {
-               error = xfs_attr_node_remove_rmt(args, state);
+               error = xfs_attr_rmtval_remove(args);
+               if (error)
+                       goto out;
+
+               /*
+                * Refill the state structure with buffers, the prior calls
+                * released our buffers.
+                */
+               error = xfs_attr_refillstate(state);
                if (error)
                        goto out;
        }