mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, ecashin@coraid.com, stable@kernel.org
Subject: Re: + aoe-properly-initialise-the-request_queues-backing_dev_info.patch added to -mm tree
Date: Wed, 05 Dec 2007 15:27:10 +0100	[thread overview]
Message-ID: <1196864830.6788.39.camel@twins> (raw)
In-Reply-To: <200712032314.lB3NE6lS022508@imap1.linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 2501 bytes --]


On Mon, 2007-12-03 at 15:14 -0800, akpm@linux-foundation.org wrote:

> ------------------------------------------------------
> Subject: aoe: properly initialise the request_queue's backing_dev_info
> From: Andrew Morton <akpm@linux-foundation.org>
> 
> Cc: "Ed L. Cashin" <ecashin@coraid.com>
> Cc: <stable@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/block/aoe/aoeblk.c |   26 ++++++++++++++++----------
>  1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff -puN drivers/block/aoe/aoeblk.c~aoe-properly-initialise-the-request_queues-backing_dev_info drivers/block/aoe/aoeblk.c
> --- a/drivers/block/aoe/aoeblk.c~aoe-properly-initialise-the-request_queues-backing_dev_info
> +++ a/drivers/block/aoe/aoeblk.c
> @@ -6,6 +6,7 @@
>  
>  #include <linux/hdreg.h>
>  #include <linux/blkdev.h>
> +#include <linux/backing-dev.h>
>  #include <linux/fs.h>
>  #include <linux/ioctl.h>
>  #include <linux/genhd.h>
> @@ -210,25 +211,20 @@ aoeblk_gdalloc(void *vp)
>  	if (gd == NULL) {
>  		printk(KERN_ERR "aoe: cannot allocate disk structure for %ld.%ld\n",
>  			d->aoemajor, d->aoeminor);
> -		spin_lock_irqsave(&d->lock, flags);
> -		d->flags &= ~DEVFL_GDALLOC;
> -		spin_unlock_irqrestore(&d->lock, flags);
> -		return;
> +		goto err;
>  	}
>  
>  	d->bufpool = mempool_create_slab_pool(MIN_BUFS, buf_pool_cache);
>  	if (d->bufpool == NULL) {
>  		printk(KERN_ERR "aoe: cannot allocate bufpool for %ld.%ld\n",
>  			d->aoemajor, d->aoeminor);
> -		put_disk(gd);
> -		spin_lock_irqsave(&d->lock, flags);
> -		d->flags &= ~DEVFL_GDALLOC;
> -		spin_unlock_irqrestore(&d->lock, flags);
> -		return;
> +		goto err_disk;
>  	}
>  
> -	spin_lock_irqsave(&d->lock, flags);
>  	blk_queue_make_request(&d->blkq, aoeblk_make_request);
> +	if (bdi_init(&d->blkq.backing_dev_info))
> +		goto err_mempool;
> +	spin_lock_irqsave(&d->lock, flags);
>  	gd->major = AOE_MAJOR;
>  	gd->first_minor = d->sysminor * AOE_PARTITIONS;
>  	gd->fops = &aoe_bdops;
> @@ -246,6 +242,16 @@ aoeblk_gdalloc(void *vp)
>  
>  	add_disk(gd);
>  	aoedisk_add_sysfs(d);
> +	return;
> +
> +err_mempool:
> +	mempool_destroy(d->bufpool);
> +err_disk:
> +	put_disk(gd);
> +err:
> +	spin_lock_irqsave(&d->lock, flags);
> +	d->flags &= ~DEVFL_GDALLOC;
> +	spin_unlock_irqrestore(&d->lock, flags);
>  }
>  
>  void


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

           reply	other threads:[~2007-12-05 14:27 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200712032314.lB3NE6lS022508@imap1.linux-foundation.org>]

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=1196864830.6788.39.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ecashin@coraid.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    /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

all inboxes | Powered by JetHome®