diff options
author | NeilBrown <neilb@suse.de> | 2014-08-23 20:19:26 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-10-09 10:07:04 +1100 |
commit | 3fd83717e47687817f5d3e45696bf22456d8b422 (patch) | |
tree | 7a745a26dc1d45de736fb1e39ce3eb5250068724 /drivers/md/raid10.c | |
parent | 5965b642ff1ba36d7a1a22df2b3c5e2cb0445e3a (diff) | |
download | linux-3fd83717e47687817f5d3e45696bf22456d8b422.tar.bz2 |
md: use set_bit/clear_bit instead of shift/mask for bi_flags changes.
Using {set,clear}_bit is more consistent than shifting and masking.
No functional change.
Signed-off-by: NeilBrown <neilb@suse.de>
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 6703751d87d7..a2788bcf75b2 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3388,7 +3388,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, /* remove last page from this bio */ bio2->bi_vcnt--; bio2->bi_iter.bi_size -= len; - bio2->bi_flags &= ~(1<< BIO_SEG_VALID); + __clear_bit(BIO_SEG_VALID, &bio2->bi_flags); } goto bio_full; } @@ -4416,7 +4416,7 @@ read_more: read_bio->bi_end_io = end_sync_read; read_bio->bi_rw = READ; read_bio->bi_flags &= (~0UL << BIO_RESET_BITS); - read_bio->bi_flags |= 1 << BIO_UPTODATE; + __set_bit(BIO_UPTODATE, &read_bio->bi_flags); read_bio->bi_vcnt = 0; read_bio->bi_iter.bi_size = 0; r10_bio->master_bio = read_bio; @@ -4473,7 +4473,7 @@ read_more: /* Remove last page from this bio */ bio2->bi_vcnt--; bio2->bi_iter.bi_size -= len; - bio2->bi_flags &= ~(1<<BIO_SEG_VALID); + __clear_bit(BIO_SEG_VALID, &bio2->bi_flags); } goto bio_full; } |