diff options
author | Josef Bacik <josef@toxicpanda.com> | 2018-09-28 07:17:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:57 -0800 |
commit | 0de8cf3f9909a7d1b6c4a87805a7fa42210dc77a (patch) | |
tree | 632e7e0841c8dba876f1ba212bdfb8b6a8207470 | |
parent | 8f2ecee5a2a2107189946b7971f5285f2f352a2b (diff) | |
download | linux-stable-0de8cf3f9909a7d1b6c4a87805a7fa42210dc77a.tar.gz linux-stable-0de8cf3f9909a7d1b6c4a87805a7fa42210dc77a.tar.bz2 linux-stable-0de8cf3f9909a7d1b6c4a87805a7fa42210dc77a.zip |
btrfs: release metadata before running delayed refs
commit f45c752b65af46bf42963295c332865d95f97fff 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: stable@vger.kernel.org # 4.4+
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 3b84f5015029..7c2f5b73b06d 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1929,6 +1929,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) return ret; } + btrfs_trans_release_metadata(trans); + trans->block_rsv = NULL; + /* make a pass through all the delayed refs we have so far * any runnings procs may add more while we are here */ @@ -1938,9 +1941,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) return ret; } - btrfs_trans_release_metadata(trans); - trans->block_rsv = NULL; - cur_trans = trans->transaction; /* |