linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH] md/bitmap:If bmap() failed,free buffers must check bitmap->pending_writes == 0.
Date: Mon, 21 May 2012 10:06:33 +1000	[thread overview]
Message-ID: <20120521100633.538592ab@notabene.brown> (raw)
In-Reply-To: <201205181938310931047@gmail.com>

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

On Fri, 18 May 2012 19:38:34 +0800 "majianpeng" <majianpeng@gmail.com> wrote:

> Signed-off-by: majianpeng <majianpeng@gmail.com>
> ---
>  drivers/md/bitmap.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 17e2b47..74540d7 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -376,6 +376,8 @@ static struct page *read_page(struct file *file, unsigned long index,
>  			bh->b_blocknr = bmap(inode, block);
>  			if (bh->b_blocknr == 0) {
>  				/* Cannot use this file! */
> +				wait_event(bitmap->write_wait,
> +					atomic_read(&bitmap->pending_writes) == 0);
>  				free_buffers(page);
>  				page = ERR_PTR(-EINVAL);
>  				goto out;

Hi,
 thanks for the patch.

However it doesn't apply against the current code in linux-next.
Some changes have been made which might make this fix unnecessary as the page
is not freed until later.
Could you check the latest code and see if the problem still exists?

Thanks,
NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2012-05-21  0:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 11:38 [PATCH] md/bitmap:If bmap() failed,free buffers must check bitmap->pending_writes == 0 majianpeng
2012-05-21  0:06 ` NeilBrown [this message]

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=20120521100633.538592ab@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=majianpeng@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).