summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-11-16 23:50:02 +0300
committerMatthew Wilcox <willy@infradead.org>2018-11-19 17:40:58 +0300
commit25bbe21bf427a81b8e3ccd480ea0e1d940256156 (patch)
tree7ff0a4b75ca42c59b35c3ee77a6fc7fd131fb3f2 /fs/dax.c
parent0e40de0338d005f73d46898a21544cd26f01b4ce (diff)
downloadlinux-25bbe21bf427a81b8e3ccd480ea0e1d940256156.tar.xz
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: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()") Cc: stable@vger.kernel.org Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dax.c b/fs/dax.c
index cf2394e2bf4b..9bcce89ea18e 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -391,6 +391,7 @@ bool dax_lock_mapping_entry(struct page *page)
rcu_read_unlock();
entry = get_unlocked_entry(&xas);
xas_unlock_irq(&xas);
+ put_unlocked_entry(&xas, entry);
rcu_read_lock();
continue;
}