mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
loop: fix bad bio_alloc() nr_iovec request
Don't allocate room for an iovec when it is not needed. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
b801a1e7db
commit
a24eab1ed5
1 changed files with 1 additions and 1 deletions
|
@ -610,7 +610,7 @@ static int loop_thread(void *data)
|
||||||
static int loop_switch(struct loop_device *lo, struct file *file)
|
static int loop_switch(struct loop_device *lo, struct file *file)
|
||||||
{
|
{
|
||||||
struct switch_request w;
|
struct switch_request w;
|
||||||
struct bio *bio = bio_alloc(GFP_KERNEL, 1);
|
struct bio *bio = bio_alloc(GFP_KERNEL, 0);
|
||||||
if (!bio)
|
if (!bio)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
init_completion(&w.wait);
|
init_completion(&w.wait);
|
||||||
|
|
Loading…
Reference in a new issue