diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-25 21:37:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-25 21:37:41 +0200 |
commit | a38523185b40fd85d2afe5b5fbfb0952f7153e96 (patch) | |
tree | 0e93b1fae6f449647cad5b9011442bf33cdc3c5b /fs | |
parent | 846e8dd47c264e0b359afed28ea88e0acdee6818 (diff) | |
parent | 41c9b1be335b5afc3b5fb71c5d16f9d5939cd13f (diff) | |
download | linux-a38523185b40fd85d2afe5b5fbfb0952f7153e96.tar.gz linux-a38523185b40fd85d2afe5b5fbfb0952f7153e96.tar.bz2 linux-a38523185b40fd85d2afe5b5fbfb0952f7153e96.zip |
erge tag 'libnvdimm-fixes-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Dan writes:
"libnvdimm/dax for 4.19-rc6
* (2) fixes for the dax error handling updates that were merged for
v4.19-rc1. My mails to Al have been bouncing recently, so I do not have
his ack but the uaccess change is of the trivial / obviously correct
variety. The address_space_operations fixes a regression.
* A filesystem-dax fix to correct the zero page lookup to be compatible
with non-x86 (mips and s390) architectures."
* tag 'libnvdimm-fixes-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
device-dax: Add missing address_space_operations
uaccess: Fix is_source param for check_copy_size() in copy_to_iter_mcsafe()
filesystem-dax: Fix use of zero page
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dax.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -1120,21 +1120,12 @@ static vm_fault_t dax_load_hole(struct address_space *mapping, void *entry, { struct inode *inode = mapping->host; unsigned long vaddr = vmf->address; - vm_fault_t ret = VM_FAULT_NOPAGE; - struct page *zero_page; - pfn_t pfn; - - zero_page = ZERO_PAGE(0); - if (unlikely(!zero_page)) { - ret = VM_FAULT_OOM; - goto out; - } + pfn_t pfn = pfn_to_pfn_t(my_zero_pfn(vaddr)); + vm_fault_t ret; - pfn = page_to_pfn_t(zero_page); dax_insert_mapping_entry(mapping, vmf, entry, pfn, RADIX_DAX_ZERO_PAGE, false); ret = vmf_insert_mixed(vmf->vma, vaddr, pfn); -out: trace_dax_load_hole(inode, vmf, ret); return ret; } |