]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop
authorDai Ngo <dai.ngo@oracle.com>
Wed, 19 Apr 2023 17:53:18 +0000 (10:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:28 +0000 (16:19 +0200)
commit4e6e498291516f23068534e706c7e42158e20d05
tree6b3deb5890a9bb0507f5a053b7858d14a2036f1c
parent786e3248d5efdc561f2ca44ffa6cf651decb2323
NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop

[ Upstream commit 147abcacee33781e75588869e944ddb07528a897 ]

The following request sequence to the same file causes the NFS client and
server getting into an infinite loop with COMMIT and NFS4ERR_DELAY:

OPEN
REMOVE
WRITE
COMMIT

Problem reported by recall11, recall12, recall14, recall20, recall22,
recall40, recall42, recall48, recall50 of nfstest suite.

This patch restores the handling of race condition in nfsd_file_do_acquire
with unlink to that prior of the regression.

Fixes: ac3a2585f018 ("nfsd: rework refcounting in filecache")
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c