Commit a24eab1e authored by Jens Axboe's avatar Jens Axboe

loop: fix bad bio_alloc() nr_iovec request

Don't allocate room for an iovec when it is not needed.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent b801a1e7
......@@ -610,7 +610,7 @@ static int loop_thread(void *data)
static int loop_switch(struct loop_device *lo, struct file *file)
{
struct switch_request w;
struct bio *bio = bio_alloc(GFP_KERNEL, 1);
struct bio *bio = bio_alloc(GFP_KERNEL, 0);
if (!bio)
return -ENOMEM;
init_completion(&w.wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment