dax: Use non-exclusive wait in wait_entry_unlocked()
authorDan Williams <dan.j.williams@intel.com>
Sat, 5 Jan 2019 19:45:13 +0000 (11:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:38:46 +0000 (17:38 +0100)
commit9621ea6b9c4c8268d715785759678b401ff36509
tree56c40092f9da4766de16ca9a5a6135f854eb8666
parentc555772c2a4e1042a12ea27413e93a89d01b04b7
dax: Use non-exclusive wait in wait_entry_unlocked()

commit d8a706414af4827fc0b4b1c0c631c607351938b9 upstream.

get_unlocked_entry() uses an exclusive wait because it is guaranteed to
eventually obtain the lock and follow on with an unlock+wakeup cycle.
The wait_entry_unlocked() path does not have the same guarantee. Rather
than open-code an extra wakeup, just switch to a non-exclusive wait.

Cc: Matthew Wilcox <willy@infradead.org>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dax.c