]> 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:33:09 +0000 (16:33 +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 f4704f5d4086758a63888dc8f1a3aaa727263055..f09d96ff20652ea674b2db55ee4829a4011edb97 100644 (file)
@@ -1035,8 +1035,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;