Commit e2896e79 authored by David Sterba's avatar David Sterba

btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent

All callers pass GFP_NOFS, we can drop the parameter and use it
directly.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d68194b2
...@@ -1842,7 +1842,7 @@ int btrfs_qgroup_trace_extent_post(struct btrfs_trans_handle *trans, ...@@ -1842,7 +1842,7 @@ int btrfs_qgroup_trace_extent_post(struct btrfs_trans_handle *trans,
} }
int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr, int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr,
u64 num_bytes, gfp_t gfp_flag) u64 num_bytes)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_qgroup_extent_record *record; struct btrfs_qgroup_extent_record *record;
...@@ -1852,7 +1852,7 @@ int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr, ...@@ -1852,7 +1852,7 @@ int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr,
if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags) if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags)
|| bytenr == 0 || num_bytes == 0) || bytenr == 0 || num_bytes == 0)
return 0; return 0;
record = kzalloc(sizeof(*record), gfp_flag); record = kzalloc(sizeof(*record), GFP_NOFS);
if (!record) if (!record)
return -ENOMEM; return -ENOMEM;
...@@ -1904,8 +1904,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans, ...@@ -1904,8 +1904,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,
num_bytes = btrfs_file_extent_disk_num_bytes(eb, fi); num_bytes = btrfs_file_extent_disk_num_bytes(eb, fi);
ret = btrfs_qgroup_trace_extent(trans, bytenr, num_bytes, ret = btrfs_qgroup_trace_extent(trans, bytenr, num_bytes);
GFP_NOFS);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -2104,12 +2103,11 @@ static int qgroup_trace_extent_swap(struct btrfs_trans_handle* trans, ...@@ -2104,12 +2103,11 @@ static int qgroup_trace_extent_swap(struct btrfs_trans_handle* trans,
* blocks for qgroup accounting. * blocks for qgroup accounting.
*/ */
ret = btrfs_qgroup_trace_extent(trans, src_path->nodes[dst_level]->start, ret = btrfs_qgroup_trace_extent(trans, src_path->nodes[dst_level]->start,
nodesize, GFP_NOFS); nodesize);
if (ret < 0) if (ret < 0)
goto out; goto out;
ret = btrfs_qgroup_trace_extent(trans, ret = btrfs_qgroup_trace_extent(trans, dst_path->nodes[dst_level]->start,
dst_path->nodes[dst_level]->start, nodesize);
nodesize, GFP_NOFS);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -2393,8 +2391,7 @@ int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans, ...@@ -2393,8 +2391,7 @@ int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans,
path->locks[level] = BTRFS_READ_LOCK; path->locks[level] = BTRFS_READ_LOCK;
ret = btrfs_qgroup_trace_extent(trans, child_bytenr, ret = btrfs_qgroup_trace_extent(trans, child_bytenr,
fs_info->nodesize, fs_info->nodesize);
GFP_NOFS);
if (ret) if (ret)
goto out; goto out;
} }
......
...@@ -321,7 +321,7 @@ int btrfs_qgroup_trace_extent_post(struct btrfs_trans_handle *trans, ...@@ -321,7 +321,7 @@ int btrfs_qgroup_trace_extent_post(struct btrfs_trans_handle *trans,
* (NULL trans) * (NULL trans)
*/ */
int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr, int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr,
u64 num_bytes, gfp_t gfp_flag); u64 num_bytes);
/* /*
* Inform qgroup to trace all leaf items of data * Inform qgroup to trace all leaf items of data
......
...@@ -749,8 +749,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, ...@@ -749,8 +749,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
*/ */
ret = btrfs_qgroup_trace_extent(trans, ret = btrfs_qgroup_trace_extent(trans,
btrfs_file_extent_disk_bytenr(eb, item), btrfs_file_extent_disk_bytenr(eb, item),
btrfs_file_extent_disk_num_bytes(eb, item), btrfs_file_extent_disk_num_bytes(eb, item));
GFP_NOFS);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment