All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: linux-raid@vger.kernel.org, neilb@suse.de
Subject: [patch]raid5: delete another BUG_ON
Date: Mon, 14 Apr 2014 14:14:17 +0800	[thread overview]
Message-ID: <20140414061417.GA26258@kernel.org> (raw)


I hit another BUG_ON with e240c1839d11152b0355442. In __get_priority_stripe(),
stripe count equals to 0 initially. Between atomic_inc and BUG_ON,
get_active_stripe() finds the stripe. So the stripe count isn't 1 any more.

Signed-off-by: Shaohua Li <shli@fusionio.com>
---
 drivers/md/raid5.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux/drivers/md/raid5.c
===================================================================
--- linux.orig/drivers/md/raid5.c	2014-04-14 11:44:11.448492119 +0800
+++ linux/drivers/md/raid5.c	2014-04-14 11:52:19.158359774 +0800
@@ -4371,7 +4371,6 @@ static struct stripe_head *__get_priorit
 	}
 	list_del_init(&sh->lru);
 	atomic_inc(&sh->count);
-	BUG_ON(atomic_read(&sh->count) != 1);
 	return sh;
 }
 

             reply	other threads:[~2014-04-14  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14  6:14 Shaohua Li [this message]
2014-04-14 22:47 ` [patch]raid5: delete another BUG_ON NeilBrown
2014-04-15  1:12   ` Shaohua Li

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=20140414061417.GA26258@kernel.org \
    --to=shli@kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.