md: fix a race condition for flush request handling
authorShaohua Li <[email protected]>
Thu, 21 Sep 2017 16:55:28 +0000 (09:55 -0700)
committerShaohua Li <[email protected]>
Thu, 28 Sep 2017 03:08:18 +0000 (20:08 -0700)
commit79bf31a3b2a7ca467cfec8ff97d359a77065d01f
tree22d15c13f9a67ccd17b21c3077160b89a66c9c62
parent393debc23c7820211d1c8253dd6a8408a7628fe7
md: fix a race condition for flush request handling

md_submit_flush_data calls pers->make_request, which missed the suspend check.
Fix it with the new md_handle_request API.

Reported-by: Nate Dailey <[email protected]>
Tested-by: Nate Dailey <[email protected]>
Fix: cc27b0c78c79(md: fix deadlock between mddev_suspend() and md_write_start())
Cc: [email protected]
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Shaohua Li <[email protected]>
drivers/md/md.c