From: Jeff Layton Date: Thu, 11 Jul 2024 19:11:13 +0000 (-0400) Subject: nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire X-Git-Tag: v6.10.13~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f490e015aa7b45edba42fc098771b7baf389585e;p=thirdparty%2Fkernel%2Fstable.git nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire [ 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 Tested-by: Youzhong Yang Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index f4704f5d40867..f09d96ff20652 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -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;