All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Marlier <patrick.marlier@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] md/bitmap: fix list_entry_rcu usage.
Date: Tue, 24 Mar 2015 11:31:47 +0100	[thread overview]
Message-ID: <55113D13.5080201@gmail.com> (raw)

Signed-off-by: Patrick Marlier <patrick.marlier@gmail.com>
---
  drivers/md/bitmap.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 3a57679..ed00e46 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -181,7 +181,7 @@ static struct md_rdev *next_active_rdev(struct 
md_rdev *rdev, struct mddev *mdde
     rcu_read_lock();
     if (rdev == NULL)
         /* start at the beginning */
-       rdev = list_entry_rcu(&mddev->disks, struct md_rdev, same_set);
+       rdev = list_entry_rcu(mddev->disks.next, struct md_rdev, same_set);
     else {
         /* release the previous rdev and start from there. */
         rdev_dec_pending(rdev, mddev);
-- 
2.1.0


                 reply	other threads:[~2015-03-24 10:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=55113D13.5080201@gmail.com \
    --to=patrick.marlier@gmail.com \
    --cc=linux-kernel@vger.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 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.