aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/raid5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index f8b906843926..f013d3662665 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -340,7 +340,8 @@ static void release_stripe(struct stripe_head *sh)
340 unsigned long flags; 340 unsigned long flags;
341 bool wakeup; 341 bool wakeup;
342 342
343 if (test_and_set_bit(STRIPE_ON_RELEASE_LIST, &sh->state)) 343 if (unlikely(!conf->mddev->thread) ||
344 test_and_set_bit(STRIPE_ON_RELEASE_LIST, &sh->state))
344 goto slow_path; 345 goto slow_path;
345 wakeup = llist_add(&sh->release_list, &conf->released_stripes); 346 wakeup = llist_add(&sh->release_list, &conf->released_stripes);
346 if (wakeup) 347 if (wakeup)