]> 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)
commit1a66bf2ff7fef5cf6368b6af90484fdde203e250
tree75b1b27ae64b689ebeddcb4093ef63786a5b3ca7
parent26c96a98ad50836831dc1c7489aa160db0f2a571
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