diff options
author | Chris Mason <clm@fb.com> | 2017-05-04 16:08:08 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2017-05-04 16:56:11 -0700 |
commit | 9bcaaea7418d09691f1ffab5c49aacafe3eef9d0 (patch) | |
tree | de8fb04851d438df09674e02002e28ce8657af76 /fs/btrfs/volumes.c | |
parent | bce19f9d232b71c4eef9ca7d0947035bbb922cef (diff) | |
download | linux-stable-9bcaaea7418d09691f1ffab5c49aacafe3eef9d0.tar.gz linux-stable-9bcaaea7418d09691f1ffab5c49aacafe3eef9d0.tar.bz2 linux-stable-9bcaaea7418d09691f1ffab5c49aacafe3eef9d0.zip |
btrfs: fix the gfp_mask for the reada_zones radix tree
Commits cc8385b59e17 and 7ef70b4d9987a7 added preallocation for the
reada radix trees and also switched them over to GFP_KERNEL for the
default gfp mask.
Since we're doing radix tree insertions under spinlocks, we need
to make sure the mask doesn't allow sleeping. This fix keeps
the radix preallocation but switches back to the original gfp_mask.
Reported-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 6cad3233181c..017b67daa3bb 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -252,7 +252,7 @@ static struct btrfs_device *__alloc_device(void) atomic_set(&dev->reada_in_flight, 0); atomic_set(&dev->dev_stats_ccnt, 0); btrfs_device_data_ordered_init(dev); - INIT_RADIX_TREE(&dev->reada_zones, GFP_KERNEL); + INIT_RADIX_TREE(&dev->reada_zones, GFP_NOFS & ~__GFP_DIRECT_RECLAIM); INIT_RADIX_TREE(&dev->reada_extents, GFP_NOFS & ~__GFP_DIRECT_RECLAIM); return dev; |