diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2015-01-29 12:38:29 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-03 16:35:51 -0500 |
commit | ad3ab8b608c454f004391bb8568916bd955001ea (patch) | |
tree | 455464bc236c272976dc7c054efec21b5f941148 /drivers/md/raid5.c | |
parent | 75aaf4c3e6a4ed48207230cf133a02258ca5abd5 (diff) |
md: do_release_stripe(): No need to call md_wakeup_thread() twice
67f455486d2ea20b2d94d6adf5b9b783d079e321 introduced a call to
md_wakeup_thread() when adding to the delayed_list. However the md
thread is woken up unconditionally just below.
Remove the unnecessary wakeup call.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index b98765f6f77f..274db1834d43 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -296,12 +296,9 @@ static void do_release_stripe(struct r5conf *conf, struct stripe_head *sh, | |||
296 | BUG_ON(atomic_read(&conf->active_stripes)==0); | 296 | BUG_ON(atomic_read(&conf->active_stripes)==0); |
297 | if (test_bit(STRIPE_HANDLE, &sh->state)) { | 297 | if (test_bit(STRIPE_HANDLE, &sh->state)) { |
298 | if (test_bit(STRIPE_DELAYED, &sh->state) && | 298 | if (test_bit(STRIPE_DELAYED, &sh->state) && |
299 | !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) { | 299 | !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) |
300 | list_add_tail(&sh->lru, &conf->delayed_list); | 300 | list_add_tail(&sh->lru, &conf->delayed_list); |
301 | if (atomic_read(&conf->preread_active_stripes) | 301 | else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && |
302 | < IO_THRESHOLD) | ||
303 | md_wakeup_thread(conf->mddev->thread); | ||
304 | } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && | ||
305 | sh->bm_seq - conf->seq_write > 0) | 302 | sh->bm_seq - conf->seq_write > 0) |
306 | list_add_tail(&sh->lru, &conf->bitmap_list); | 303 | list_add_tail(&sh->lru, &conf->bitmap_list); |
307 | else { | 304 | else { |