mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Minfei Huang <mnghuan@gmail.com>
Cc: axboe@fb.com, ming.lei@canonical.com, viro@zeniv.linux.org.uk,
	sagig@mellanox.com, mszeredi@suse.cz,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop: Make user notify for adding loop device failed
Date: Tue, 07 Jun 2016 09:42:56 -0400	[thread overview]
Message-ID: <x49shwpdsin.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1465265115-12479-1-git-send-email-mnghuan@gmail.com> (Minfei Huang's message of "Tue, 7 Jun 2016 10:05:15 +0800")

Minfei Huang <mnghuan@gmail.com> 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 <mnghuan@gmail.com>
> ---
>  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 <jmoyer@redhat.com>

  parent reply	other threads:[~2016-06-07 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07  2:05 Minfei Huang
2016-06-07  2:49 ` Ming Lei
2016-06-07 13:42 ` Jeff Moyer [this message]
2016-07-12 23:17 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x49shwpdsin.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=axboe@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=mnghuan@gmail.com \
    --cc=mszeredi@suse.cz \
    --cc=sagig@mellanox.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome