mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 19:27:13 +00:00
btrfs: use a bool to track qgroup record insertion when adding ref head
We are using an integer as a boolean to track the qgroup record insertion status when adding a delayed reference head. Since all we need is a boolean, switch the type from int to bool to make it more obvious. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4d34ad34d7
commit
293f8197a4
@ -762,11 +762,11 @@ static noinline struct btrfs_delayed_ref_head *
|
|||||||
add_delayed_ref_head(struct btrfs_trans_handle *trans,
|
add_delayed_ref_head(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_delayed_ref_head *head_ref,
|
struct btrfs_delayed_ref_head *head_ref,
|
||||||
struct btrfs_qgroup_extent_record *qrecord,
|
struct btrfs_qgroup_extent_record *qrecord,
|
||||||
int action, int *qrecord_inserted_ret)
|
int action, bool *qrecord_inserted_ret)
|
||||||
{
|
{
|
||||||
struct btrfs_delayed_ref_head *existing;
|
struct btrfs_delayed_ref_head *existing;
|
||||||
struct btrfs_delayed_ref_root *delayed_refs;
|
struct btrfs_delayed_ref_root *delayed_refs;
|
||||||
int qrecord_inserted = 0;
|
bool qrecord_inserted = false;
|
||||||
|
|
||||||
delayed_refs = &trans->transaction->delayed_refs;
|
delayed_refs = &trans->transaction->delayed_refs;
|
||||||
|
|
||||||
@ -776,7 +776,7 @@ add_delayed_ref_head(struct btrfs_trans_handle *trans,
|
|||||||
delayed_refs, qrecord))
|
delayed_refs, qrecord))
|
||||||
kfree(qrecord);
|
kfree(qrecord);
|
||||||
else
|
else
|
||||||
qrecord_inserted = 1;
|
qrecord_inserted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_add_delayed_ref_head(trans->fs_info, head_ref, action);
|
trace_add_delayed_ref_head(trans->fs_info, head_ref, action);
|
||||||
@ -872,7 +872,7 @@ int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans,
|
|||||||
struct btrfs_delayed_ref_head *head_ref;
|
struct btrfs_delayed_ref_head *head_ref;
|
||||||
struct btrfs_delayed_ref_root *delayed_refs;
|
struct btrfs_delayed_ref_root *delayed_refs;
|
||||||
struct btrfs_qgroup_extent_record *record = NULL;
|
struct btrfs_qgroup_extent_record *record = NULL;
|
||||||
int qrecord_inserted;
|
bool qrecord_inserted;
|
||||||
bool is_system;
|
bool is_system;
|
||||||
int action = generic_ref->action;
|
int action = generic_ref->action;
|
||||||
int level = generic_ref->tree_ref.level;
|
int level = generic_ref->tree_ref.level;
|
||||||
@ -965,7 +965,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans,
|
|||||||
struct btrfs_delayed_ref_head *head_ref;
|
struct btrfs_delayed_ref_head *head_ref;
|
||||||
struct btrfs_delayed_ref_root *delayed_refs;
|
struct btrfs_delayed_ref_root *delayed_refs;
|
||||||
struct btrfs_qgroup_extent_record *record = NULL;
|
struct btrfs_qgroup_extent_record *record = NULL;
|
||||||
int qrecord_inserted;
|
bool qrecord_inserted;
|
||||||
int action = generic_ref->action;
|
int action = generic_ref->action;
|
||||||
int ret;
|
int ret;
|
||||||
u64 bytenr = generic_ref->bytenr;
|
u64 bytenr = generic_ref->bytenr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user