Skip to content

Commit 147abca

Browse files
daimngochucklever
authored andcommitted
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>
1 parent 695bc1f commit 147abca

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
@@ -1099,8 +1099,6 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
10991099
* then unhash.
11001100
*/
11011101
if (status != nfs_ok || inode->i_nlink == 0)
1102-
status = nfserr_jukebox;
1103-
if (status != nfs_ok)
11041102
nfsd_file_unhash(nf);
11051103
clear_and_wake_up_bit(NFSD_FILE_PENDING, &nf->nf_flags);
11061104
if (status == nfs_ok)

0 commit comments

Comments
 (0)