diff options
author | Jan Kara <jack@suse.cz> | 2017-11-01 16:36:34 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-11-03 06:26:23 -0700 |
commit | a0987ad5c576626fdb40547f5ac99b4f90608dda (patch) | |
tree | 21e2e9a3bfad8765a98f37af5d0ecb09ef428930 /fs/dax.c | |
parent | 5e161e4066d3ebeaff95a4b979b42f8bf00494d5 (diff) | |
download | op-kernel-dev-a0987ad5c576626fdb40547f5ac99b4f90608dda.zip op-kernel-dev-a0987ad5c576626fdb40547f5ac99b4f90608dda.tar.gz |
dax: Create local variable for VMA in dax_iomap_pte_fault()
There are already two users and more are coming.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'fs/dax.c')
-rw-r--r-- | fs/dax.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1108,7 +1108,8 @@ static int dax_fault_return(int error) static int dax_iomap_pte_fault(struct vm_fault *vmf, const struct iomap_ops *ops) { - struct address_space *mapping = vmf->vma->vm_file->f_mapping; + struct vm_area_struct *vma = vmf->vma; + struct address_space *mapping = vma->vm_file->f_mapping; struct inode *inode = mapping->host; unsigned long vaddr = vmf->address; loff_t pos = (loff_t)vmf->pgoff << PAGE_SHIFT; @@ -1196,7 +1197,7 @@ static int dax_iomap_pte_fault(struct vm_fault *vmf, case IOMAP_MAPPED: if (iomap.flags & IOMAP_F_NEW) { count_vm_event(PGMAJFAULT); - count_memcg_event_mm(vmf->vma->vm_mm, PGMAJFAULT); + count_memcg_event_mm(vma->vm_mm, PGMAJFAULT); major = VM_FAULT_MAJOR; } error = dax_insert_mapping(vmf, &iomap, pos, entry); |