summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-26 23:12:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-26 23:12:12 -0700
commit5e608a027082ae426e100a582031e0ff40becc83 (patch)
tree7696ef52b7ea1e873dc367dbc2843bedcc09c6b1 /drivers
parent65fc7d54efb6b03dcf61d98aa0fd68fe968c211c (diff)
parent11bd969fdefea3ac0cb9791224f1e09784e21e58 (diff)
downloadlinux-5e608a027082ae426e100a582031e0ff40becc83.tar.bz2
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "11 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: silently skip readahead for DAX inodes dax: fix device-dax region base fs/seq_file: fix out-of-bounds read mm: memcontrol: avoid unused function warning mm: clarify COMPACTION Kconfig text treewide: replace config_enabled() with IS_ENABLED() (2nd round) printk: fix parsing of "brl=" option soft_dirty: fix soft_dirty during THP split sysctl: handle error writing UINT_MAX to u32 fields get_maintainer: quiet noisy implicit -f vcs_file_exists checking byteswap: don't use __builtin_bswap*() with sparse
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dax/pmem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c
index dfb168568af1..1f01e98c83c7 100644
--- a/drivers/dax/pmem.c
+++ b/drivers/dax/pmem.c
@@ -116,6 +116,9 @@ static int dax_pmem_probe(struct device *dev)
if (rc)
return rc;
+ /* adjust the dax_region resource to the start of data */
+ res.start += le64_to_cpu(pfn_sb->dataoff);
+
nd_region = to_nd_region(dev->parent);
dax_region = alloc_dax_region(dev, nd_region->id, &res,
le32_to_cpu(pfn_sb->align), addr, PFN_DEV|PFN_MAP);