summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-01-26 15:52:32 +0100
committerJens Axboe <axboe@kernel.dk>2021-01-27 09:51:48 -0700
commit616c6a6884e273349cda19483dfd7f5b7fd3da52 (patch)
tree71620682fda2b2975f5f632c3f106bc1fc2b1d21 /fs/btrfs
parentf91ca2a370bec58eb3d54315b5cfa3a2a9288acc (diff)
downloadlinux-stable-616c6a6884e273349cda19483dfd7f5b7fd3da52.tar.gz
linux-stable-616c6a6884e273349cda19483dfd7f5b7fd3da52.tar.bz2
linux-stable-616c6a6884e273349cda19483dfd7f5b7fd3da52.zip
btrfs: use bio_kmalloc in __alloc_device
Use bio_kmalloc instead of open coding it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0a6de859eb22..584ba093cf49 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -421,7 +421,7 @@ static struct btrfs_device *__alloc_device(struct btrfs_fs_info *fs_info)
* Preallocate a bio that's always going to be used for flushing device
* barriers and matches the device lifespan
*/
- dev->flush_bio = bio_alloc_bioset(GFP_KERNEL, 0, NULL);
+ dev->flush_bio = bio_kmalloc(GFP_KERNEL, 0);
if (!dev->flush_bio) {
kfree(dev);
return ERR_PTR(-ENOMEM);