Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull dax fix from Dan Williams:
"A single dax fix that has been soaking awaiting other fixes under
discussion to join it. As it is getting late in the cycle lets proceed
with this fix and save follow-on changes for post-v5.3-rc1.

- Fix xarray entry association for mixed mappings"

* tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
dax: Fix xarray entry association for mixed mappings

+4 -5
+4 -5
fs/dax.c
··· 720 720 721 721 xas_reset(xas); 722 722 xas_lock_irq(xas); 723 - if (dax_entry_size(entry) != dax_entry_size(new_entry)) { 723 + if (dax_is_zero_entry(entry) || dax_is_empty_entry(entry)) { 724 + void *old; 725 + 724 726 dax_disassociate_entry(entry, mapping, false); 725 727 dax_associate_entry(new_entry, mapping, vmf->vma, vmf->address); 726 - } 727 - 728 - if (dax_is_zero_entry(entry) || dax_is_empty_entry(entry)) { 729 728 /* 730 729 * Only swap our new entry into the page cache if the current 731 730 * entry is a zero page or an empty entry. If a normal PTE or ··· 733 734 * existing entry is a PMD, we will just leave the PMD in the 734 735 * tree and dirty it if necessary. 735 736 */ 736 - void *old = dax_lock_entry(xas, new_entry); 737 + old = dax_lock_entry(xas, new_entry); 737 738 WARN_ON_ONCE(old != xa_mk_value(xa_to_value(entry) | 738 739 DAX_LOCKED)); 739 740 entry = new_entry;