From de2051147771017a61b62c02fd4e883c9b07712d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 29 Nov 2021 11:22:00 +0100 Subject: 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 Reviewed-by: Gao Xiang [erofs] Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20211129102203.2243509-27-hch@lst.de Signed-off-by: Dan Williams --- fs/dax.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs/dax.c') 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) -- cgit v1.2.3