diff options
author | J. Bruce Fields <bfields@redhat.com> | 2015-02-02 17:29:29 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-02-02 17:29:29 +0100 |
commit | a584143b01ce69803116ae8d0a4db382acc728d7 (patch) | |
tree | 002733709647fa1e17683a9d21dbc23ae99e3d2d /arch/s390/mm | |
parent | nfsd: factor out a helper to decode nfstime4 values (diff) | |
parent | locks: update comments that refer to inode->i_flock (diff) | |
download | linux-a584143b01ce69803116ae8d0a4db382acc728d7.tar.xz linux-a584143b01ce69803116ae8d0a4db382acc728d7.zip |
Merge branch 'locks-3.20' of git://git.samba.org/jlayton/linux into for-3.20
Christoph's block pnfs patches have some minor dependencies on these
lock patches.
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/pgtable.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index be99357d238c..3cf8cc03fff6 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -322,11 +322,12 @@ static int gmap_alloc_table(struct gmap *gmap, unsigned long *table, static unsigned long __gmap_segment_gaddr(unsigned long *entry) { struct page *page; - unsigned long offset; + unsigned long offset, mask; offset = (unsigned long) entry / sizeof(unsigned long); offset = (offset & (PTRS_PER_PMD - 1)) * PMD_SIZE; - page = pmd_to_page((pmd_t *) entry); + mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1); + page = virt_to_page((void *)((unsigned long) entry & mask)); return page->index + offset; } |