mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
fuse: use min_not_zero() in fuse_init_server_timeout()
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> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
fd10f40af3
commit
b773346540
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user