mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
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>
This commit is contained in:
parent
6ce328462c
commit
ffd96e35c1
1 changed files with 2 additions and 2 deletions
|
@ -4014,7 +4014,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
|
|||
}
|
||||
}
|
||||
|
||||
if (bio_data_dir(bi) == WRITE &&
|
||||
if (rw == WRITE &&
|
||||
logical_sector >= mddev->suspend_lo &&
|
||||
logical_sector < mddev->suspend_hi) {
|
||||
release_stripe(sh);
|
||||
|
@ -4032,7 +4032,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
|
|||
}
|
||||
|
||||
if (test_bit(STRIPE_EXPANDING, &sh->state) ||
|
||||
!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
|
||||
!add_stripe_bio(sh, bi, dd_idx, rw)) {
|
||||
/* Stripe is busy expanding or
|
||||
* add failed due to overlap. Flush everything
|
||||
* and wait a while
|
||||
|
|
Loading…
Add table
Reference in a new issue