mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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>
This commit is contained in:
parent
f91ca2a370
commit
616c6a6884
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue