md: remove handling of flush_pending in md_submit_flush_data

None of the functions called between setting flush_pending to 1, and
atomic_dec_and_test can change flush_pending, or will anything
running in any other thread (as ->flush_bio is not NULL). So the
atomic_dec_and_test will always succeed.
So remove the atomic_sec and the atomic_dec_and_test.

Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown 2b74e12e be20e6c6

+3 -6
+3 -6
drivers/md/md.c
··· 404 404 mddev_t *mddev = container_of(ws, mddev_t, flush_work); 405 405 struct bio *bio = mddev->flush_bio; 406 406 407 - atomic_set(&mddev->flush_pending, 1); 408 - 409 407 if (bio->bi_size == 0) 410 408 /* an empty barrier - all done */ 411 409 bio_endio(bio, 0); ··· 412 414 if (mddev->pers->make_request(mddev, bio)) 413 415 generic_make_request(bio); 414 416 } 415 - if (atomic_dec_and_test(&mddev->flush_pending)) { 416 - mddev->flush_bio = NULL; 417 - wake_up(&mddev->sb_wait); 418 - } 417 + 418 + mddev->flush_bio = NULL; 419 + wake_up(&mddev->sb_wait); 419 420 } 420 421 421 422 void md_flush_request(mddev_t *mddev, struct bio *bio)