From: Linus Torvalds Date: Sat, 15 May 2021 15:28:08 +0000 (-0700) Subject: Merge tag 'dax-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim... X-Git-Tag: v5.13-rc2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=393f42f113b607786207449dc3241d05ec61d5dc;p=users%2Fdwmw2%2Flinux.git Merge tag 'dax-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "A fix for a hang condition due to missed wakeups in the filesystem-dax core when exercised by virtiofs. This bug has been there from the beginning, but the condition has not triggered on other filesystems since they hold a lock over invalidation events" * tag 'dax-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Wake up all waiters after invalidating dax entry dax: Add a wakeup mode parameter to put_unlocked_entry() dax: Add an enum for specifying dax wakup mode --- 393f42f113b607786207449dc3241d05ec61d5dc diff --cc fs/dax.c index 69216241392f2,df5485b4bddf1..62352cbcf0f40 --- a/fs/dax.c +++ b/fs/dax.c @@@ -524,8 -535,8 +535,8 @@@ retry dax_disassociate_entry(entry, mapping, false); xas_store(xas, NULL); /* undo the PMD join */ - dax_wake_entry(xas, entry, true); + dax_wake_entry(xas, entry, WAKE_ALL); - mapping->nrexceptional--; + mapping->nrpages -= PG_PMD_NR; entry = NULL; xas_set(xas, index); } @@@ -661,10 -672,10 +672,10 @@@ static int __dax_invalidate_entry(struc goto out; dax_disassociate_entry(entry, mapping, trunc); xas_store(&xas, NULL); - mapping->nrexceptional--; + mapping->nrpages -= 1UL << dax_entry_order(entry); ret = 1; out: - put_unlocked_entry(&xas, entry); + put_unlocked_entry(&xas, entry, WAKE_ALL); xas_unlock_irq(&xas); return ret; }