From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] fuse: use min_not_zero() in fuse_init_server_timeout()
Date: Sat, 1 Aug 2026 00:44:36 +0900 [thread overview]
Message-ID: <20260731154440.1117457-1-ekffu200098@gmail.com> (raw)
fuse_init_server_timeout() limits timeout to fuse_max_req_timeout with
the same logic as min_not_zero(), and returns early exactly when the
computed timeout would be zero.
So use min_not_zero() instead and return when the computed timeout is
zero.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
fs/fuse/req_timeout.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/fs/fuse/req_timeout.c b/fs/fuse/req_timeout.c
index 6cc6fc491343..95a1acd7bc08 100644
--- a/fs/fuse/req_timeout.c
+++ b/fs/fuse/req_timeout.c
@@ -128,18 +128,12 @@ static void set_request_timeout(struct fuse_chan *fch, unsigned int timeout)
void fuse_init_server_timeout(struct fuse_chan *fch, unsigned int timeout)
{
- if (!timeout && !fuse_max_req_timeout && !fuse_default_req_timeout)
- return;
-
if (!timeout)
timeout = fuse_default_req_timeout;
- if (fuse_max_req_timeout) {
- if (timeout)
- timeout = min(fuse_max_req_timeout, timeout);
- else
- timeout = fuse_max_req_timeout;
- }
+ timeout = min_not_zero(timeout, fuse_max_req_timeout);
+ if (!timeout)
+ return;
timeout = max(FUSE_TIMEOUT_TIMER_FREQ, timeout);
--
2.43.0
next reply other threads:[~2026-07-31 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 15:44 Sang-Heon Jeon [this message]
2026-07-31 17:29 ` Joanne Koong
2026-08-18 12:35 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260731154440.1117457-1-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=fuse-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®