diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-17 23:40:45 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-06-26 09:47:16 -0400 |
commit | 814203c4ac05316a4d6430c6e443ae0419e3f177 (patch) | |
tree | 3787091144fae9e3340f8e0a41f4d71553b334bf | |
parent | db6eede4b6b18f2104e012e7df030dbe1e8f0c60 (diff) | |
download | linux-next-814203c4ac05316a4d6430c6e443ae0419e3f177.tar.gz |
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>
-rw-r--r-- | block/partitions/core.c | 3 |
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; |