This was added a very long time ago to work around issues with delayed
refs and with qgroups.  Both of these issues have since been properly
fixed, so all this does is cause a lot of lock contention with anybody
else who is running delayed refs.

Signed-off-by: Josef Bacik <[email protected]>
---
 fs/btrfs/transaction.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 4776e055f7f9..6e3abe9b74c0 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1686,12 +1686,6 @@ static noinline int create_pending_snapshot(struct 
btrfs_trans_handle *trans,
                goto fail;
        }
 
-       ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
-       if (ret) {
-               btrfs_abort_transaction(trans, ret);
-               goto fail;
-       }
-
        /*
         * Do special qgroup accounting for snapshot, as we do some qgroup
         * snapshot hack to do fast snapshot.
@@ -1739,12 +1733,6 @@ static noinline int create_pending_snapshot(struct 
btrfs_trans_handle *trans,
                }
        }
 
-       ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
-       if (ret) {
-               btrfs_abort_transaction(trans, ret);
-               goto fail;
-       }
-
 fail:
        pending->error = ret;
 dir_item_existed:
-- 
2.26.2

Reply via email to