diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-01-20 19:32:02 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-20 19:32:02 +0300 |
commit | 8dfe11681758b5c23618233e664d3a5ac417a3ed (patch) | |
tree | 10a105f648e9776fa81439eb8828fe28c821fc92 | |
parent | b4f664252f51e119e9403ef84b6e9ff36d119510 (diff) | |
parent | dc5d17a3c39b06aef866afca19245a9cfb533a79 (diff) | |
download | linux-8dfe11681758b5c23618233e664d3a5ac417a3ed.tar.xz |
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.c | 2 |
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) { |