Skip to content

Commit 8dfe116

Browse files
committed
Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.11
Pull MD fix from Song. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Set prev_flush_start and flush_bio in an atomic way
2 parents b4f6642 + dc5d17a commit 8dfe116

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/md/md.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,10 @@ static void md_submit_flush_data(struct work_struct *ws)
639639
* could wait for this and below md_handle_request could wait for those
640640
* bios because of suspend check
641641
*/
642+
spin_lock_irq(&mddev->lock);
642643
mddev->prev_flush_start = mddev->start_flush;
643644
mddev->flush_bio = NULL;
645+
spin_unlock_irq(&mddev->lock);
644646
wake_up(&mddev->sb_wait);
645647

646648
if (bio->bi_iter.bi_size == 0) {

0 commit comments

Comments
 (0)