IB/umem: Set correct address to the invalidation function
authorArtemy Kovalyov <artemyko@mellanox.com>
Sun, 25 Nov 2018 18:34:25 +0000 (20:34 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 26 Nov 2018 23:28:36 +0000 (16:28 -0700)
commit605728e65ad303a1b639bcae7c0abd2e24e6a930
treeda972c50c98feca8dab7cd31d172c05caa1a9e0a
parent4d5422a309deecec906c491f8aea77593a46321d
IB/umem: Set correct address to the invalidation function

The invalidate range was using PAGE_SIZE instead of the computed 'end',
and had the wrong transformation of page_index due the weird
construction. This can trigger during error unwind and would cause
malfunction.

Inline the code and correct the math.

Fixes: 403cd12e2cf7 ("IB/umem: Add contiguous ODP support")
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/umem_odp.c