File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 19
19
#include <linux/sched.h>
20
20
#include <linux/slab.h>
21
21
#include <linux/rbtree.h>
22
+ #include <linux/vmalloc.h>
22
23
#include "ctree.h"
23
24
#include "disk-io.h"
24
25
#include "transaction.h"
@@ -5361,10 +5362,13 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
5361
5362
goto out ;
5362
5363
}
5363
5364
5364
- tmp_buf = kmalloc (left_root -> nodesize , GFP_KERNEL );
5365
+ tmp_buf = kmalloc (left_root -> nodesize , GFP_KERNEL | __GFP_NOWARN );
5365
5366
if (!tmp_buf ) {
5366
- ret = - ENOMEM ;
5367
- goto out ;
5367
+ tmp_buf = vmalloc (left_root -> nodesize );
5368
+ if (!tmp_buf ) {
5369
+ ret = - ENOMEM ;
5370
+ goto out ;
5371
+ }
5368
5372
}
5369
5373
5370
5374
left_path -> search_commit_root = 1 ;
@@ -5565,7 +5569,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
5565
5569
out :
5566
5570
btrfs_free_path (left_path );
5567
5571
btrfs_free_path (right_path );
5568
- kfree (tmp_buf );
5572
+ kvfree (tmp_buf );
5569
5573
return ret ;
5570
5574
}
5571
5575
You can’t perform that action at this time.
0 commit comments