Commit bcc8e07f authored by David Sterba's avatar David Sterba

btrfs: sink GFP flags parameter to tree_mod_log_insert_root

All (1) callers pass the same value.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 176ef8f5
...@@ -663,7 +663,7 @@ __tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, ...@@ -663,7 +663,7 @@ __tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
static noinline int static noinline int
tree_mod_log_insert_root(struct btrfs_fs_info *fs_info, tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
struct extent_buffer *old_root, struct extent_buffer *old_root,
struct extent_buffer *new_root, gfp_t flags, struct extent_buffer *new_root,
int log_removal) int log_removal)
{ {
struct tree_mod_elem *tm = NULL; struct tree_mod_elem *tm = NULL;
...@@ -678,14 +678,14 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info, ...@@ -678,14 +678,14 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
if (log_removal && btrfs_header_level(old_root) > 0) { if (log_removal && btrfs_header_level(old_root) > 0) {
nritems = btrfs_header_nritems(old_root); nritems = btrfs_header_nritems(old_root);
tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *), tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *),
flags); GFP_NOFS);
if (!tm_list) { if (!tm_list) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_tms; goto free_tms;
} }
for (i = 0; i < nritems; i++) { for (i = 0; i < nritems; i++) {
tm_list[i] = alloc_tree_mod_elem(old_root, i, tm_list[i] = alloc_tree_mod_elem(old_root, i,
MOD_LOG_KEY_REMOVE_WHILE_FREEING, flags); MOD_LOG_KEY_REMOVE_WHILE_FREEING, GFP_NOFS);
if (!tm_list[i]) { if (!tm_list[i]) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_tms; goto free_tms;
...@@ -693,7 +693,7 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info, ...@@ -693,7 +693,7 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
} }
} }
tm = kzalloc(sizeof(*tm), flags); tm = kzalloc(sizeof(*tm), GFP_NOFS);
if (!tm) { if (!tm) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_tms; goto free_tms;
...@@ -943,7 +943,7 @@ tree_mod_log_set_root_pointer(struct btrfs_root *root, ...@@ -943,7 +943,7 @@ tree_mod_log_set_root_pointer(struct btrfs_root *root,
{ {
int ret; int ret;
ret = tree_mod_log_insert_root(root->fs_info, root->node, ret = tree_mod_log_insert_root(root->fs_info, root->node,
new_root_node, GFP_NOFS, log_removal); new_root_node, log_removal);
BUG_ON(ret < 0); BUG_ON(ret < 0);
} }
......
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