提交 a24eab1e 编写于 作者: J 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: NJens Axboe <jens.axboe@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册