]> 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>
Fri, 4 Oct 2024 14:29:32 +0000 (16:29 +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 07bf219f9ae482a352c9a3fb122f06769320241a..88cefb630e171513a361acd22765e64803bb25c2 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;