Skip to content

Commit 61c30c9

Browse files
jankaradjbw
authored andcommitted
dax: Fix missed wakeup in put_unlocked_entry()
The condition checking whether put_unlocked_entry() needs to wake up following waiter got broken by commit 23c84eb ("dax: Fix missed wakeup with PMD faults"). We need to wake the waiter whenever the passed entry is valid (i.e., non-NULL and not special conflict entry). This could lead to processes never being woken up when waiting for entry lock. Fix the condition. Cc: <[email protected]> Link: http://lore.kernel.org/r/[email protected] Fixes: 23c84eb ("dax: Fix missed wakeup with PMD faults") Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Dan Williams <[email protected]>
1 parent 609488b commit 61c30c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/dax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void wait_entry_unlocked(struct xa_state *xas, void *entry)
266266
static void put_unlocked_entry(struct xa_state *xas, void *entry)
267267
{
268268
/* If we were the only waiter woken, wake the next one */
269-
if (entry && dax_is_conflict(entry))
269+
if (entry && !dax_is_conflict(entry))
270270
dax_wake_entry(xas, entry, false);
271271
}
272272

0 commit comments

Comments
 (0)