Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire
@ 2024-07-11 19:11 Jeff Layton
  2024-07-12 13:32 ` Chuck Lever
  2024-07-15  0:27 ` NeilBrown
  0 siblings, 2 replies; 10+ messages in thread
From: Jeff Layton @ 2024-07-11 19:11 UTC (permalink / raw)
  To: Chuck Lever, Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey
  Cc: linux-nfs, linux-kernel, Youzhong Yang, Jeff Layton

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.

Cc: Youzhong Yang <youzhong@gmail.com>
Fixes: c6593366c0bf ("nfsd: don't kill nfsd_files because of lease break error")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
This is replacement for PATCH 1/3 in the series I sent yesterday. I
think it makes sense to just eliminate this case.
---
 fs/nfsd/filecache.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index f84913691b78..b9dc7c22242c 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -1038,8 +1038,6 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
 	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;

---
base-commit: ec1772c39fa8dd85340b1a02040806377ffbff27
change-id: 20240711-nfsd-next-c9d17f66e2bd

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-29 14:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 19:11 [PATCH] nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire Jeff Layton
2024-07-12 13:32 ` Chuck Lever
2024-07-12 13:37   ` Youzhong Yang
2024-07-12 18:30   ` Youzhong Yang
2024-07-12 18:58     ` Chuck Lever
2024-07-15  0:27 ` NeilBrown
2024-07-15 12:25   ` Jeff Layton
2024-07-15 14:06     ` Chuck Lever
2024-07-29 14:26       ` Youzhong Yang
2024-07-29 14:40         ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox