Skip to content

Commit

Permalink
loop: fix bad bio_alloc() nr_iovec request
Browse files Browse the repository at this point in the history
Don't allocate room for an iovec when it is not needed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Jan 11, 2008
1 parent b801a1e commit a24eab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a24eab1

Please sign in to comment.