diff options
| author | Tony Lindgren <tony@atomide.com> | 2015-06-09 23:37:31 -0700 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2015-06-09 23:37:31 -0700 |
| commit | 63e63a1981c7247fea41ce97b3144befc8f2fb7b (patch) | |
| tree | 74a5708579661a741b6c62096530e68aee949273 /drivers/md/bitmap.c | |
| parent | 5b83b2234be6733cfe22036c38031b2c890b3db8 (diff) | |
| parent | a3e362f18c01f28abcb6d8e5d00be8b5d97ea09d (diff) | |
Merge branch 'wakeirq-8250' into omap-for-v4.2/wakeirq-v2
Diffstat (limited to 'drivers/md/bitmap.c')
| -rw-r--r-- | drivers/md/bitmap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 2bc56e2a3526..135a0907e9de 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -177,11 +177,16 @@ static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mdde * nr_pending is 0 and In_sync is clear, the entries we return will * still be in the same position on the list when we re-enter * list_for_each_entry_continue_rcu. + * + * Note that if entered with 'rdev == NULL' to start at the + * beginning, we temporarily assign 'rdev' to an address which + * isn't really an rdev, but which can be used by + * list_for_each_entry_continue_rcu() to find the first entry. */ rcu_read_lock(); if (rdev == NULL) /* start at the beginning */ - rdev = list_entry_rcu(&mddev->disks, struct md_rdev, same_set); + rdev = list_entry(&mddev->disks, struct md_rdev, same_set); else { /* release the previous rdev and start from there. */ rdev_dec_pending(rdev, mddev); |
