summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-01-20 09:32:02 -0700
committerJens Axboe <axboe@kernel.dk>2021-01-20 09:32:02 -0700
commit8dfe11681758b5c23618233e664d3a5ac417a3ed (patch)
tree10a105f648e9776fa81439eb8828fe28c821fc92
parentb4f664252f51e119e9403ef84b6e9ff36d119510 (diff)
parentdc5d17a3c39b06aef866afca19245a9cfb533a79 (diff)
downloadlinux-stable-8dfe11681758b5c23618233e664d3a5ac417a3ed.tar.gz
linux-stable-8dfe11681758b5c23618233e664d3a5ac417a3ed.tar.bz2
linux-stable-8dfe11681758b5c23618233e664d3a5ac417a3ed.zip
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
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ca409428b4fc..04384452a7ab 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -639,8 +639,10 @@ static void md_submit_flush_data(struct work_struct *ws)
* could wait for this and below md_handle_request could wait for those
* bios because of suspend check
*/
+ spin_lock_irq(&mddev->lock);
mddev->prev_flush_start = mddev->start_flush;
mddev->flush_bio = NULL;
+ spin_unlock_irq(&mddev->lock);
wake_up(&mddev->sb_wait);
if (bio->bi_iter.bi_size == 0) {