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.12-rc1~97^2~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81a95c2b1d605743220f28db04b8da13a65c4059;p=thirdparty%2Fkernel%2Flinux.git nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire 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 --- diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 01d76f6bc80a0..9d7bb65b07463 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -1037,8 +1037,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;