diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-09-11 08:32:04 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-11 08:33:31 -0400 |
commit | 1f98a13f623e0ef666690a18c1250335fc6d7ef1 (patch) | |
tree | 15ca2dddffaa18a0d1844957f4f8cc707cbb8117 /drivers/md/raid10.c | |
parent | e7e503aedb1f4d165081cb8d47a58c38f80f0cb4 (diff) |
bio: first step in sanitizing the bio->bi_rw flag testing
Get rid of any functions that test for these bits and make callers
use bio_rw_flagged() directly. Then it is at least directly apparent
what variable and flag they check.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 3d9020cf6f6e..d0a2152e064f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -796,12 +796,12 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
796 | int i; | 796 | int i; |
797 | int chunk_sects = conf->chunk_mask + 1; | 797 | int chunk_sects = conf->chunk_mask + 1; |
798 | const int rw = bio_data_dir(bio); | 798 | const int rw = bio_data_dir(bio); |
799 | const int do_sync = bio_sync(bio); | 799 | const bool do_sync = bio_rw_flagged(bio, BIO_RW_SYNCIO); |
800 | struct bio_list bl; | 800 | struct bio_list bl; |
801 | unsigned long flags; | 801 | unsigned long flags; |
802 | mdk_rdev_t *blocked_rdev; | 802 | mdk_rdev_t *blocked_rdev; |
803 | 803 | ||
804 | if (unlikely(bio_barrier(bio))) { | 804 | if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { |
805 | bio_endio(bio, -EOPNOTSUPP); | 805 | bio_endio(bio, -EOPNOTSUPP); |
806 | return 0; | 806 | return 0; |
807 | } | 807 | } |
@@ -1610,7 +1610,7 @@ static void raid10d(mddev_t *mddev) | |||
1610 | raid_end_bio_io(r10_bio); | 1610 | raid_end_bio_io(r10_bio); |
1611 | bio_put(bio); | 1611 | bio_put(bio); |
1612 | } else { | 1612 | } else { |
1613 | const int do_sync = bio_sync(r10_bio->master_bio); | 1613 | const bool do_sync = bio_rw_flagged(r10_bio->master_bio, BIO_RW_SYNCIO); |
1614 | bio_put(bio); | 1614 | bio_put(bio); |
1615 | rdev = conf->mirrors[mirror].rdev; | 1615 | rdev = conf->mirrors[mirror].rdev; |
1616 | if (printk_ratelimit()) | 1616 | if (printk_ratelimit()) |