Skip to content

Commit 96dcb97

Browse files
committed
Merge branch 'for-5.14/dax' into libnvdimm-fixes
Pick up some small dax cleanups that make some of Ira's follow on work easier.
2 parents f21453b + b05d4c5 commit 96dcb97

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

drivers/dax/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages,
313313
return -ENXIO;
314314

315315
if (nr_pages < 0)
316-
return nr_pages;
316+
return -EINVAL;
317317

318318
avail = dax_dev->ops->direct_access(dax_dev, pgoff, nr_pages,
319319
kaddr, pfn);

fs/dax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ static int copy_cow_page_dax(struct block_device *bdev, struct dax_device *dax_d
722722
return rc;
723723

724724
id = dax_read_lock();
725-
rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(PAGE_SIZE), &kaddr, NULL);
725+
rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, NULL);
726726
if (rc < 0) {
727727
dax_read_unlock(id);
728728
return rc;

fs/fuse/dax.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,6 @@ void fuse_dax_conn_free(struct fuse_conn *fc)
12351235
static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)
12361236
{
12371237
long nr_pages, nr_ranges;
1238-
void *kaddr;
1239-
pfn_t pfn;
12401238
struct fuse_dax_mapping *range;
12411239
int ret, id;
12421240
size_t dax_size = -1;
@@ -1248,8 +1246,8 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)
12481246
INIT_DELAYED_WORK(&fcd->free_work, fuse_dax_free_mem_worker);
12491247

12501248
id = dax_read_lock();
1251-
nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size), &kaddr,
1252-
&pfn);
1249+
nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size), NULL,
1250+
NULL);
12531251
dax_read_unlock(id);
12541252
if (nr_pages < 0) {
12551253
pr_debug("dax_direct_access() returned %ld\n", nr_pages);

0 commit comments

Comments
 (0)