Commit fd3d46e6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chandan Babu R

xfs: remove xfarray_sortinfo.page_kaddr

Now that xfile pages don't need kmapping, there is no need to cache
the kernel virtual address for them.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent 6907e3c0
......@@ -570,18 +570,7 @@ xfarray_sort_get_page(
loff_t pos,
uint64_t len)
{
int error;
error = xfile_get_page(si->array->xfile, pos, len, &si->xfpage);
if (error)
return error;
/*
* xfile pages must never be mapped into userspace, so we skip the
* dcache flush when mapping the page.
*/
si->page_kaddr = page_address(si->xfpage.page);
return 0;
return xfile_get_page(si->array->xfile, pos, len, &si->xfpage);
}
/* Release a page we grabbed for sorting records. */
......@@ -589,11 +578,8 @@ static inline int
xfarray_sort_put_page(
struct xfarray_sortinfo *si)
{
if (!si->page_kaddr)
if (!xfile_page_cached(&si->xfpage))
return 0;
si->page_kaddr = NULL;
return xfile_put_page(si->array->xfile, &si->xfpage);
}
......@@ -636,7 +622,7 @@ xfarray_pagesort(
return error;
xfarray_sort_bump_heapsorts(si);
startp = si->page_kaddr + offset_in_page(lo_pos);
startp = page_address(si->xfpage.page) + offset_in_page(lo_pos);
sort(startp, hi - lo + 1, si->array->obj_size, si->cmp_fn, NULL);
xfarray_sort_bump_stores(si);
......@@ -883,7 +869,7 @@ xfarray_sort_load_cached(
return error;
}
memcpy(ptr, si->page_kaddr + offset_in_page(idx_pos),
memcpy(ptr, page_address(si->xfpage.page) + offset_in_page(idx_pos),
si->array->obj_size);
return 0;
}
......
......@@ -107,7 +107,6 @@ struct xfarray_sortinfo {
/* Cache a page here for faster access. */
struct xfile_page xfpage;
void *page_kaddr;
#ifdef DEBUG
/* Performance statistics. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment