aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2023-07-24 09:54:27 -0700
committerJens Axboe <[email protected]>2023-07-24 19:55:16 -0600
commit6850b2dd5c25f27f7b74414553f047d4c12dd66c (patch)
treecdb131931e54a2383435d0b21532e6ff93e54fff
parentcd1d83e24e689f25de7e34bea697971750138d5f (diff)
block: use SECTOR_SHIFT bio_add_hw_page
Use the SECTOR_SHIFT magic constant instead of the magic number. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Jinyoung Choi <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index 72488ecea47a..445be4bdd99b 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1007,7 +1007,7 @@ int bio_add_hw_page(struct request_queue *q, struct bio *bio,
if (WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED)))
return 0;
- if (((bio->bi_iter.bi_size + len) >> 9) > max_sectors)
+ if (((bio->bi_iter.bi_size + len) >> SECTOR_SHIFT) > max_sectors)
return 0;
if (bio->bi_vcnt > 0) {