Commit 25bbe21b authored by Matthew Wilcox's avatar Matthew Wilcox

dax: Avoid losing wakeup in dax_lock_mapping_entry

After calling get_unlocked_entry(), you have to call
put_unlocked_entry() to avoid subsequent waiters losing wakeups.

Fixes: c2a7d2a1 ("filesystem-dax: Introduce dax_lock_mapping_entry()")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
parent 0e40de03
...@@ -391,6 +391,7 @@ bool dax_lock_mapping_entry(struct page *page) ...@@ -391,6 +391,7 @@ bool dax_lock_mapping_entry(struct page *page)
rcu_read_unlock(); rcu_read_unlock();
entry = get_unlocked_entry(&xas); entry = get_unlocked_entry(&xas);
xas_unlock_irq(&xas); xas_unlock_irq(&xas);
put_unlocked_entry(&xas, entry);
rcu_read_lock(); rcu_read_lock();
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment