Commit 2e29be2e authored by Ira Weiny's avatar Ira Weiny Committed by Dan Williams

fs/fuse: Remove unneeded kaddr parameter

fuse_dax_mem_range_init() does not need the address or the pfn of the
memory requested in dax_direct_access().  It is only calling direct
access to get the number of pages.

Remove the unused variables and stop requesting the kaddr and pfn from
dax_direct_access().
Reviewed-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarVivek Goyal <vgoyal@redhat.com>
Link: https://lore.kernel.org/r/20210525172428.3634316-2-ira.weiny@intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 62fb9874
...@@ -1234,8 +1234,6 @@ void fuse_dax_conn_free(struct fuse_conn *fc) ...@@ -1234,8 +1234,6 @@ void fuse_dax_conn_free(struct fuse_conn *fc)
static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd) static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)
{ {
long nr_pages, nr_ranges; long nr_pages, nr_ranges;
void *kaddr;
pfn_t pfn;
struct fuse_dax_mapping *range; struct fuse_dax_mapping *range;
int ret, id; int ret, id;
size_t dax_size = -1; size_t dax_size = -1;
...@@ -1247,8 +1245,8 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd) ...@@ -1247,8 +1245,8 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)
INIT_DELAYED_WORK(&fcd->free_work, fuse_dax_free_mem_worker); INIT_DELAYED_WORK(&fcd->free_work, fuse_dax_free_mem_worker);
id = dax_read_lock(); id = dax_read_lock();
nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size), &kaddr, nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size), NULL,
&pfn); NULL);
dax_read_unlock(id); dax_read_unlock(id);
if (nr_pages < 0) { if (nr_pages < 0) {
pr_debug("dax_direct_access() returned %ld\n", nr_pages); pr_debug("dax_direct_access() returned %ld\n", nr_pages);
......
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