Skip to content

Commit 0de8cf3

Browse files
josefbacikgregkh
authored andcommitted
btrfs: release metadata before running delayed refs
commit f45c752 upstream. We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation. CC: [email protected] # 4.4+ Reviewed-by: Omar Sandoval <[email protected]> Reviewed-by: Liu Bo <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8f2ecee commit 0de8cf3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/transaction.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,6 +1929,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
19291929
return ret;
19301930
}
19311931

1932+
btrfs_trans_release_metadata(trans);
1933+
trans->block_rsv = NULL;
1934+
19321935
/* make a pass through all the delayed refs we have so far
19331936
* any runnings procs may add more while we are here
19341937
*/
@@ -1938,9 +1941,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
19381941
return ret;
19391942
}
19401943

1941-
btrfs_trans_release_metadata(trans);
1942-
trans->block_rsv = NULL;
1943-
19441944
cur_trans = trans->transaction;
19451945

19461946
/*

0 commit comments

Comments
 (0)