summaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-11-20 18:51:24 -0500
committerTheodore Ts'o <tytso@mit.edu>2016-11-20 18:51:24 -0500
commite2ae766c1b030271b5099b25674e2131d1d1e8c1 (patch)
tree95a2676b55c9de1ff3a5085154c8493a1537b597 /fs/ext4/file.c
parent96f8ba3dd632aff684cc7c67d9f4af435be0341c (diff)
downloadop-kernel-dev-e2ae766c1b030271b5099b25674e2131d1d1e8c1.zip
op-kernel-dev-e2ae766c1b030271b5099b25674e2131d1d1e8c1.tar.gz
ext4: convert DAX faults to iomap infrastructure
Convert DAX faults to use iomap infrastructure. We would not have to start transaction in ext4_dax_fault() anymore since ext4_iomap_begin takes care of that but so far we do that to avoid lock inversion of transaction start with DAX entry lock which gets acquired in dax_iomap_fault() before calling ->iomap_begin handler. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 1953fe3..b5f1844 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -275,7 +275,7 @@ static int ext4_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
if (IS_ERR(handle))
result = VM_FAULT_SIGBUS;
else
- result = dax_fault(vma, vmf, ext4_dax_get_block);
+ result = dax_iomap_fault(vma, vmf, &ext4_iomap_ops);
if (write) {
if (!IS_ERR(handle))
@@ -309,9 +309,10 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
if (IS_ERR(handle))
result = VM_FAULT_SIGBUS;
- else
- result = dax_pmd_fault(vma, addr, pmd, flags,
- ext4_dax_get_block);
+ else {
+ result = dax_iomap_pmd_fault(vma, addr, pmd, flags,
+ &ext4_iomap_ops);
+ }
if (write) {
if (!IS_ERR(handle))
OpenPOWER on IntegriCloud