Re: [PATCH] loop: Make user notify for adding loop device failed
On 06/06/2016 07:05 PM, Minfei Huang wrote: There is no error number returned if loop driver fails in function alloc_disk to add new loop device. Add a correct error number to make user notify in this case. Sorry about the delay, vacation got in the way. Added for 4.8, thanks. -- Jens Axboe
Re: [PATCH] loop: Make user notify for adding loop device failed
On 06/06/2016 07:05 PM, Minfei Huang wrote: There is no error number returned if loop driver fails in function alloc_disk to add new loop device. Add a correct error number to make user notify in this case. Sorry about the delay, vacation got in the way. Added for 4.8, thanks. -- Jens Axboe
Re: [PATCH] loop: Make user notify for adding loop device failed
Minfei Huangwrites: > There is no error number returned if loop driver fails in function > alloc_disk to add new loop device. Add a correct error number to make > user notify in this case. > > Signed-off-by: Minfei Huang > --- > drivers/block/loop.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 1fa8cc2..2caaf6f 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) >*/ > queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); > > + err = -ENOMEM; > disk = lo->lo_disk = alloc_disk(1 << part_shift); > if (!disk) > goto out_free_queue; Looks good. Reviewed-by: Jeff Moyer
Re: [PATCH] loop: Make user notify for adding loop device failed
Minfei Huang writes: > There is no error number returned if loop driver fails in function > alloc_disk to add new loop device. Add a correct error number to make > user notify in this case. > > Signed-off-by: Minfei Huang > --- > drivers/block/loop.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 1fa8cc2..2caaf6f 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) >*/ > queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); > > + err = -ENOMEM; > disk = lo->lo_disk = alloc_disk(1 << part_shift); > if (!disk) > goto out_free_queue; Looks good. Reviewed-by: Jeff Moyer
Re: [PATCH] loop: Make user notify for adding loop device failed
On Tue, Jun 7, 2016 at 10:05 AM, Minfei Huangwrote: > There is no error number returned if loop driver fails in function > alloc_disk to add new loop device. Add a correct error number to make > user notify in this case. > > Signed-off-by: Minfei Huang Good catch! Reviewed-by: Ming Lei > --- > drivers/block/loop.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 1fa8cc2..2caaf6f 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) > */ > queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); > > + err = -ENOMEM; > disk = lo->lo_disk = alloc_disk(1 << part_shift); > if (!disk) > goto out_free_queue; > -- > 2.7.4 (Apple Git-66) >
Re: [PATCH] loop: Make user notify for adding loop device failed
On Tue, Jun 7, 2016 at 10:05 AM, Minfei Huang wrote: > There is no error number returned if loop driver fails in function > alloc_disk to add new loop device. Add a correct error number to make > user notify in this case. > > Signed-off-by: Minfei Huang Good catch! Reviewed-by: Ming Lei > --- > drivers/block/loop.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 1fa8cc2..2caaf6f 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) > */ > queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); > > + err = -ENOMEM; > disk = lo->lo_disk = alloc_disk(1 << part_shift); > if (!disk) > goto out_free_queue; > -- > 2.7.4 (Apple Git-66) >
[PATCH] loop: Make user notify for adding loop device failed
There is no error number returned if loop driver fails in function alloc_disk to add new loop device. Add a correct error number to make user notify in this case. Signed-off-by: Minfei Huang--- drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 1fa8cc2..2caaf6f 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) */ queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); + err = -ENOMEM; disk = lo->lo_disk = alloc_disk(1 << part_shift); if (!disk) goto out_free_queue; -- 2.7.4 (Apple Git-66)
[PATCH] loop: Make user notify for adding loop device failed
There is no error number returned if loop driver fails in function alloc_disk to add new loop device. Add a correct error number to make user notify in this case. Signed-off-by: Minfei Huang --- drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 1fa8cc2..2caaf6f 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i) */ queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue); + err = -ENOMEM; disk = lo->lo_disk = alloc_disk(1 << part_shift); if (!disk) goto out_free_queue; -- 2.7.4 (Apple Git-66)