Skip to content

Commit

Permalink
btrfs: release metadata before running delayed refs
Browse files Browse the repository at this point in the history
Source: linux-mvista-2.4
MR: 96580, 00000
Type: Integration
Disposition: Merged from linux-mvista-2.4
ChangeID: 85df1f9f8fb0c9c4801f5cc8ab1b25e77c1f06cd
Description:

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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
  • Loading branch information
josefbacik authored and jpuhlman committed Feb 4, 2019
1 parent 75a9f98 commit 2f06ae3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
return ret;
}

btrfs_trans_release_metadata(trans, fs_info);
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
*/
Expand All @@ -1964,9 +1967,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
return ret;
}

btrfs_trans_release_metadata(trans, fs_info);
trans->block_rsv = NULL;

cur_trans = trans->transaction;

/*
Expand Down

0 comments on commit 2f06ae3

Please sign in to comment.