diff options
author | Namhyung Kim <namhyung@gmail.com> | 2011-07-18 03:38:51 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-18 03:38:51 -0400 |
commit | ffd96e35c16a99fdb490cc5723b8e32135ae5883 (patch) | |
tree | 0ae71ae96af464f9e2edb60cdcfdc32e5cd92388 /drivers/md/raid5.c | |
parent | 6ce328462c1145a217ba1f27b882743be1407759 (diff) |
md/raid5: get rid of duplicated call to bio_data_dir()
In raid5::make_request(), once bio_data_dir(@bi) is detected
it never (and couldn't) be changed. Use the result always.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 0f71aa9a07c5..71480646a459 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -4014,7 +4014,7 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
4014 | } | 4014 | } |
4015 | } | 4015 | } |
4016 | 4016 | ||
4017 | if (bio_data_dir(bi) == WRITE && | 4017 | if (rw == WRITE && |
4018 | logical_sector >= mddev->suspend_lo && | 4018 | logical_sector >= mddev->suspend_lo && |
4019 | logical_sector < mddev->suspend_hi) { | 4019 | logical_sector < mddev->suspend_hi) { |
4020 | release_stripe(sh); | 4020 | release_stripe(sh); |
@@ -4032,7 +4032,7 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
4032 | } | 4032 | } |
4033 | 4033 | ||
4034 | if (test_bit(STRIPE_EXPANDING, &sh->state) || | 4034 | if (test_bit(STRIPE_EXPANDING, &sh->state) || |
4035 | !add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { | 4035 | !add_stripe_bio(sh, bi, dd_idx, rw)) { |
4036 | /* Stripe is busy expanding or | 4036 | /* Stripe is busy expanding or |
4037 | * add failed due to overlap. Flush everything | 4037 | * add failed due to overlap. Flush everything |
4038 | * and wait a while | 4038 | * and wait a while |