summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/dax.c b/fs/dax.c
index 5364549d67a4..d7a923d15224 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1123,7 +1123,6 @@ static vm_fault_t dax_pmd_load_hole(struct xa_state *xas, struct vm_fault *vmf,
s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap)
{
- sector_t sector = iomap_sector(iomap, pos & PAGE_MASK);
pgoff_t pgoff = dax_iomap_pgoff(iomap, pos);
long rc, id;
void *kaddr;
@@ -1131,8 +1130,7 @@ s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap)
unsigned offset = offset_in_page(pos);
unsigned size = min_t(u64, PAGE_SIZE - offset, length);
- if (IS_ALIGNED(sector << SECTOR_SHIFT, PAGE_SIZE) &&
- (size == PAGE_SIZE))
+ if (IS_ALIGNED(pos, PAGE_SIZE) && size == PAGE_SIZE)
page_aligned = true;
id = dax_read_lock();