]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire
authorJeff Layton <jlayton@kernel.org>
Thu, 11 Jul 2024 19:11:13 +0000 (15:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:07:53 +0000 (15:07 +0200)
[ Upstream commit 81a95c2b1d605743220f28db04b8da13a65c4059 ]

Given that we do the search and insertion while holding the i_lock, I
don't think it's possible for us to get EEXIST here. Remove this case.

Fixes: c6593366c0bf ("nfsd: don't kill nfsd_files because of lease break error")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Youzhong Yang <youzhong@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/filecache.c

index 615ea8324911e5b93cf2605919981f20f95395eb..96a2be833b20b6e7f97b1112f6cd9d906392b561 100644 (file)
@@ -1040,8 +1040,6 @@ retry:
        if (likely(ret == 0))
                goto open_file;
 
-       if (ret == -EEXIST)
-               goto retry;
        trace_nfsd_file_insert_err(rqstp, inode, may_flags, ret);
        status = nfserr_jukebox;
        goto construction_err;