mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 00:20:52 -05:00
btrfs: qgroup: remove unnecessary calls to btrfs_mark_buffer_dirty()
We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
bd25bf9dcd
commit
d74a36f37e
1 changed files with 0 additions and 18 deletions
|
@ -673,9 +673,6 @@ static int add_qgroup_relation_item(struct btrfs_trans_handle *trans, u64 src,
|
||||||
key.offset = dst;
|
key.offset = dst;
|
||||||
|
|
||||||
ret = btrfs_insert_empty_item(trans, quota_root, path, &key, 0);
|
ret = btrfs_insert_empty_item(trans, quota_root, path, &key, 0);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, path->nodes[0]);
|
|
||||||
|
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -752,8 +749,6 @@ static int add_qgroup_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_qgroup_info_excl(leaf, qgroup_info, 0);
|
btrfs_set_qgroup_info_excl(leaf, qgroup_info, 0);
|
||||||
btrfs_set_qgroup_info_excl_cmpr(leaf, qgroup_info, 0);
|
btrfs_set_qgroup_info_excl_cmpr(leaf, qgroup_info, 0);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, leaf);
|
|
||||||
|
|
||||||
btrfs_release_path(path);
|
btrfs_release_path(path);
|
||||||
|
|
||||||
key.type = BTRFS_QGROUP_LIMIT_KEY;
|
key.type = BTRFS_QGROUP_LIMIT_KEY;
|
||||||
|
@ -771,8 +766,6 @@ static int add_qgroup_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_qgroup_limit_rsv_rfer(leaf, qgroup_limit, 0);
|
btrfs_set_qgroup_limit_rsv_rfer(leaf, qgroup_limit, 0);
|
||||||
btrfs_set_qgroup_limit_rsv_excl(leaf, qgroup_limit, 0);
|
btrfs_set_qgroup_limit_rsv_excl(leaf, qgroup_limit, 0);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, leaf);
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
out:
|
out:
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
|
@ -859,9 +852,6 @@ static int update_qgroup_limit_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_qgroup_limit_max_excl(l, qgroup_limit, qgroup->max_excl);
|
btrfs_set_qgroup_limit_max_excl(l, qgroup_limit, qgroup->max_excl);
|
||||||
btrfs_set_qgroup_limit_rsv_rfer(l, qgroup_limit, qgroup->rsv_rfer);
|
btrfs_set_qgroup_limit_rsv_rfer(l, qgroup_limit, qgroup->rsv_rfer);
|
||||||
btrfs_set_qgroup_limit_rsv_excl(l, qgroup_limit, qgroup->rsv_excl);
|
btrfs_set_qgroup_limit_rsv_excl(l, qgroup_limit, qgroup->rsv_excl);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, l);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -905,9 +895,6 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_qgroup_info_rfer_cmpr(l, qgroup_info, qgroup->rfer_cmpr);
|
btrfs_set_qgroup_info_rfer_cmpr(l, qgroup_info, qgroup->rfer_cmpr);
|
||||||
btrfs_set_qgroup_info_excl(l, qgroup_info, qgroup->excl);
|
btrfs_set_qgroup_info_excl(l, qgroup_info, qgroup->excl);
|
||||||
btrfs_set_qgroup_info_excl_cmpr(l, qgroup_info, qgroup->excl_cmpr);
|
btrfs_set_qgroup_info_excl_cmpr(l, qgroup_info, qgroup->excl_cmpr);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, l);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -947,9 +934,6 @@ static int update_qgroup_status_item(struct btrfs_trans_handle *trans)
|
||||||
btrfs_set_qgroup_status_generation(l, ptr, trans->transid);
|
btrfs_set_qgroup_status_generation(l, ptr, trans->transid);
|
||||||
btrfs_set_qgroup_status_rescan(l, ptr,
|
btrfs_set_qgroup_status_rescan(l, ptr,
|
||||||
fs_info->qgroup_rescan_progress.objectid);
|
fs_info->qgroup_rescan_progress.objectid);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, l);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1130,8 +1114,6 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info,
|
||||||
BTRFS_QGROUP_STATUS_FLAGS_MASK);
|
BTRFS_QGROUP_STATUS_FLAGS_MASK);
|
||||||
btrfs_set_qgroup_status_rescan(leaf, ptr, 0);
|
btrfs_set_qgroup_status_rescan(leaf, ptr, 0);
|
||||||
|
|
||||||
btrfs_mark_buffer_dirty(trans, leaf);
|
|
||||||
|
|
||||||
key.objectid = 0;
|
key.objectid = 0;
|
||||||
key.type = BTRFS_ROOT_REF_KEY;
|
key.type = BTRFS_ROOT_REF_KEY;
|
||||||
key.offset = 0;
|
key.offset = 0;
|
||||||
|
|
Loading…
Reference in a new issue