mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 01:43:18 +00:00
device-dax: use ALIGN() for determining pgoff
Rather than calculating @pgoff manually, switch to ALIGN() instead. Link: https://lkml.kernel.org/r/[email protected] Suggested-by: Dan Williams <[email protected]> Signed-off-by: Joao Martins <[email protected]> Reviewed-by: Dan Williams <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Jane Chu <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: John Hubbard <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Muchun Song <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Vishal Verma <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
committed by
Linus Torvalds
parent
c4386bd8ee
commit
b9b5777f09
@@ -234,8 +234,8 @@ static vm_fault_t dev_dax_huge_fault(struct vm_fault *vmf,
|
||||
* mapped. No need to consider the zero page, or racing
|
||||
* conflicting mappings.
|
||||
*/
|
||||
pgoff = linear_page_index(vmf->vma, vmf->address
|
||||
& ~(fault_size - 1));
|
||||
pgoff = linear_page_index(vmf->vma,
|
||||
ALIGN(vmf->address, fault_size));
|
||||
for (i = 0; i < fault_size / PAGE_SIZE; i++) {
|
||||
struct page *page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user