aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_mmap.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-04-12 21:59:01 -0700
committerDan Williams <dan.j.williams@intel.com>2017-04-12 21:59:01 -0700
commitbfca9acf1a5df0ff98fbf47e363adb48612bb7ec (patch)
treea50287c88fdc60a73912d205d7bce41b7af53827 /drivers/infiniband/sw/rxe/rxe_mmap.c
parentdevice-dax: utilize new cdev_device_add helper function (diff)
parentx86, pmem: fix broken __copy_user_nocache cache-bypass assumptions (diff)
downloadlinux-dev-bfca9acf1a5df0ff98fbf47e363adb48612bb7ec.tar.xz
linux-dev-bfca9acf1a5df0ff98fbf47e363adb48612bb7ec.zip
Merge branch 'for-4.11/libnvdimm' into for-4.12/dax
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_mmap.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c
index c572a4c09359..bd812e00988e 100644
--- a/drivers/infiniband/sw/rxe/rxe_mmap.c
+++ b/drivers/infiniband/sw/rxe/rxe_mmap.c
@@ -156,10 +156,10 @@ struct rxe_mmap_info *rxe_create_mmap_info(struct rxe_dev *rxe,
spin_lock_bh(&rxe->mmap_offset_lock);
if (rxe->mmap_offset == 0)
- rxe->mmap_offset = PAGE_SIZE;
+ rxe->mmap_offset = ALIGN(PAGE_SIZE, SHMLBA);
ip->info.offset = rxe->mmap_offset;
- rxe->mmap_offset += size;
+ rxe->mmap_offset += ALIGN(size, SHMLBA);
spin_unlock_bh(&rxe->mmap_offset_lock);