summaryrefslogtreecommitdiffstats
path: root/block/partitions
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-18 05:40:45 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-08-02 18:34:03 +0200
commit069fc464f1e80df06d156ef606cebc61ee00b63e (patch)
treec052a22ad9895213dbca0df267879673349d3606 /block/partitions
parentblock: Handle partition read errors more consistently (diff)
downloadlinux-069fc464f1e80df06d156ef606cebc61ee00b63e.tar.xz
linux-069fc464f1e80df06d156ef606cebc61ee00b63e.zip
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) <willy@infradead.org>
Diffstat (limited to 'block/partitions')
-rw-r--r--block/partitions/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 58034dd2d215..269c86523e67 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;