From: Matthew Wilcox (Oracle) Date: Wed, 18 May 2022 03:40:45 +0000 (-0400) Subject: block: Use PAGE_SECTORS_SHIFT X-Git-Tag: baikal/mips/sdk6.1~5169^2~32 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=705c20742d7654e94e149e5d7f0a875632b80803;p=kernel.git block: Use PAGE_SECTORS_SHIFT The bare use of '9' confuses some people. We also don't need this cast, since the compiler does exactly that cast for us. Signed-off-by: Matthew Wilcox (Oracle) --- diff --git a/block/partitions/core.c b/block/partitions/core.c index 58034dd2d2155..269c86523e67d 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -712,8 +712,7 @@ void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p) goto out; } - page = read_mapping_page(mapping, - (pgoff_t)(n >> (PAGE_SHIFT - 9)), NULL); + page = read_mapping_page(mapping, n >> PAGE_SECTORS_SHIFT, NULL); if (IS_ERR(page)) goto out;