aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-01-18 12:42:13 -0500
committerDavid Sterba <dsterba@suse.com>2016-02-11 09:19:39 -0500
commited0244faf59e33ff915b83acd15c903b81fd357b (patch)
tree8573846ea2e518c3fdc8d2fd4dab42430a309e22
parente780b0d1c1523ec8cd489c6910fb8c5ee452bb6c (diff)
btrfs: reada: use GFP_KERNEL everywhere
The readahead framework is not on the critical writeback path we don't need to use GFP_NOFS for allocations. All error paths are handled and the readahead failures are not fatal. The actual users (scrub, dev-replace) will trigger reads if the blocks are not found in cache. Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/reada.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 619f92963e27..c5f1773c4794 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -280,7 +280,7 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info,
280 end = start + cache->key.offset - 1; 280 end = start + cache->key.offset - 1;
281 btrfs_put_block_group(cache); 281 btrfs_put_block_group(cache);
282 282
283 zone = kzalloc(sizeof(*zone), GFP_NOFS); 283 zone = kzalloc(sizeof(*zone), GFP_KERNEL);
284 if (!zone) 284 if (!zone)
285 return NULL; 285 return NULL;
286 286
@@ -343,7 +343,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
343 if (re) 343 if (re)
344 return re; 344 return re;
345 345
346 re = kzalloc(sizeof(*re), GFP_NOFS); 346 re = kzalloc(sizeof(*re), GFP_KERNEL);
347 if (!re) 347 if (!re)
348 return NULL; 348 return NULL;
349 349
@@ -566,7 +566,7 @@ static int reada_add_block(struct reada_control *rc, u64 logical,
566 if (!re) 566 if (!re)
567 return -1; 567 return -1;
568 568
569 rec = kzalloc(sizeof(*rec), GFP_NOFS); 569 rec = kzalloc(sizeof(*rec), GFP_KERNEL);
570 if (!rec) { 570 if (!rec) {
571 reada_extent_put(root->fs_info, re); 571 reada_extent_put(root->fs_info, re);
572 return -ENOMEM; 572 return -ENOMEM;
@@ -791,7 +791,7 @@ static void reada_start_machine(struct btrfs_fs_info *fs_info)
791{ 791{
792 struct reada_machine_work *rmw; 792 struct reada_machine_work *rmw;
793 793
794 rmw = kzalloc(sizeof(*rmw), GFP_NOFS); 794 rmw = kzalloc(sizeof(*rmw), GFP_KERNEL);
795 if (!rmw) { 795 if (!rmw) {
796 /* FIXME we cannot handle this properly right now */ 796 /* FIXME we cannot handle this properly right now */
797 BUG(); 797 BUG();
@@ -926,7 +926,7 @@ struct reada_control *btrfs_reada_add(struct btrfs_root *root,
926 .offset = (u64)-1 926 .offset = (u64)-1
927 }; 927 };
928 928
929 rc = kzalloc(sizeof(*rc), GFP_NOFS); 929 rc = kzalloc(sizeof(*rc), GFP_KERNEL);
930 if (!rc) 930 if (!rc)
931 return ERR_PTR(-ENOMEM); 931 return ERR_PTR(-ENOMEM);
932 932