NFS: Fix deadlocks in nfs_scan_commit_list()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 19:44:16 +0000 (15:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:00 +0000 (19:17 +0100)
commitcab693c0fe29a714e69afb8b472619d951941fc8
treebb647755386c237c0a768fb4350026ab2e2f90d0
parent97eaf7af7fd1a4f6e882e812846d59c95085c296
NFS: Fix deadlocks in nfs_scan_commit_list()

[ Upstream commit 64a93dbf25d3a1368bb58ddf0f61d0a92d7479e3 ]

Partially revert commit 2ce209c42c01 ("NFS: Wait for requests that are
locked on the commit list"), since it can lead to deadlocks between
commit requests and nfs_join_page_group().
For now we should assume that any locked requests on the commit list are
either about to be removed and committed by another task, or the writes
they describe are about to be retransmitted. In either case, we should
not need to worry.

Fixes: 2ce209c42c01 ("NFS: Wait for requests that are locked on the commit list")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/write.c