Skip to content

Commit cb9ffbc

Browse files
committed
Merge: NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2499 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2196432 commit 147abca Author: Dai Ngo <dai.ngo@oracle.com> Date: Wed Apr 19 10:53:18 2023 -0700 NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop 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: ac3a258 ("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> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Approved-by: Scott Mayhew <smayhew@redhat.com> Approved-by: Jeffrey Layton <jlayton@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents 23ef72f + fd97692 commit cb9ffbc

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/nfsd/filecache.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,6 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
11691169
* then unhash.
11701170
*/
11711171
if (status == nfs_ok && key.inode->i_nlink == 0)
1172-
status = nfserr_jukebox;
1173-
if (status != nfs_ok)
11741172
nfsd_file_unhash(nf);
11751173
clear_bit_unlock(NFSD_FILE_PENDING, &nf->nf_flags);
11761174
smp_mb__after_atomic();

0 commit comments

Comments
 (0)