Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Dai Ngo and committed by
Chuck Lever
147abcac 695bc1f3

-2
-2
fs/nfsd/filecache.c
··· 1099 1099 * then unhash. 1100 1100 */ 1101 1101 if (status != nfs_ok || inode->i_nlink == 0) 1102 - status = nfserr_jukebox; 1103 - if (status != nfs_ok) 1104 1102 nfsd_file_unhash(nf); 1105 1103 clear_and_wake_up_bit(NFSD_FILE_PENDING, &nf->nf_flags); 1106 1104 if (status == nfs_ok)