summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-29 11:22:00 +0100
committerDan Williams <dan.j.williams@intel.com>2021-12-04 08:58:54 -0800
commitde2051147771017a61b62c02fd4e883c9b07712d (patch)
treed34d624dc761687aea694c3a68b443d6fbe35102 /fs/dax.c
parentcd913c76f489def1a388e3a5b10df94948ede3f5 (diff)
fsdax: shift partition offset handling into the file systems
Remove the last user of ->bdev in dax.c by requiring the file system to pass in an address that already includes the DAX offset. As part of the only set ->bdev or ->daxdev when actually required in the ->iomap_begin methods. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> [erofs] Reviewed-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20211129102203.2243509-27-hch@lst.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/dax.c b/fs/dax.c
index 148e8b0967f3..e0eecd8e3a8f 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -711,11 +711,7 @@ int dax_invalidate_mapping_entry_sync(struct address_space *mapping,
static pgoff_t dax_iomap_pgoff(const struct iomap *iomap, loff_t pos)
{
- phys_addr_t paddr = iomap->addr + (pos & PAGE_MASK) - iomap->offset;
-
- if (iomap->bdev)
- paddr += (get_start_sect(iomap->bdev) << SECTOR_SHIFT);
- return PHYS_PFN(paddr);
+ return PHYS_PFN(iomap->addr + (pos & PAGE_MASK) - iomap->offset);
}
static int copy_cow_page_dax(struct vm_fault *vmf, const struct iomap_iter *iter)