]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Don't deadlock when cookie hashes collide
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Mar 2022 02:27:13 +0000 (22:27 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Mar 2022 13:14:39 +0000 (09:14 -0400)
commitfdef7c68aa915f27398de0833d8fb0ac2b735680
tree75b1b27ae64b689ebeddcb4093ef63786a5b3ca7
parent006042a9612bd259223f23035cb946a1116a4a5e
NFS: Don't deadlock when cookie hashes collide

In the very rare case where the readdir reply contains multiple cookies
that map to the same hash value, we can end up deadlocking waiting for a
page lock that we already hold. In this case we should fail the page
lock by using grab_cache_page_nowait().

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c