From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87DDF444708 for ; Fri, 31 Jul 2026 15:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785512839; cv=none; b=eUykXi1D4j6aKTIY/Etf0gqfqd1inIzs0HhplflieHvHJfPshwJmFtMSrM5L+5emLJsHNeTb5jV5KLNYF3v0UtGXXZXeJkjSxIj3Yzt1/btVECMVDPj6V0BIFGFnP0wfc6cp/aY8EXIIyHpnNHiMrLzL248GMYbpLq3xbNibpY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785512839; c=relaxed/simple; bh=q9fTxzQBxBbEOD0ugwC1u9DmGKFny8cbzCFkkk/qHaA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i8BQvR9ti4qY3wSJZPxSw6OGsrowEWv8mhFp0bzU8l/MBvySDOkTNEAYZt2uHwbplEgFU2IrTp0I7cm3Mv+nh5wC+cyUBM2spzOvgb4Dn/JArNUMIyrCvlmDaiH19oSuchN5goujSTwXHQbaF9PmjHAVqB47+ShPBtzYxhsIR/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Cgl3oK59; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cgl3oK59" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-84e04df8c46so1267027b3a.2 for ; Fri, 31 Jul 2026 08:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785512837; x=1786117637; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ztFk56Q0jQFdzSj0FNqD8W6vnZr/B9xHGh5NLKm3eIQ=; b=Cgl3oK59OWRPMd3uTbN1eoNxRMrH/QUSsZsl4VSDnS3UsKXQ3ygRyXXWWRkQ6IbREM WteeAHrIsQtAmcwDcSRw5te4JrSo1d/yu6kDytreuHazUGnEtLO0qqqZMROKqDAyiPYi TxmkrRJH14Zz/XlXMGaWDfvFmCd5YHDrqXfDXbDE6dTSKGlWBH1W5x307VKxaDTwOT/B 01JKjwyjp6DMTzA3I2gQ99MQyTr28n6gvdzRNYXG3+cNG760E5vaWg76Dr1sYIYE4ovh gqZlOnnh1YIw4uZ4MYi+aHHSQi6O+Cx4eTjfcO6hB4NCx6WgVQME/8tfs17qIgT5Tgkd UVaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785512837; x=1786117637; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ztFk56Q0jQFdzSj0FNqD8W6vnZr/B9xHGh5NLKm3eIQ=; b=j97cUuxJlc/DKF4CY6kG66m/7MLU3Yx1yKevVJD3P6JOAB0kdnomnYPC2k4GV0scxP 8AQSruhF67E6UXSqSm05XDDMFUGMItK0dzmulSBtpaTJV0NFPa3fw+Ao6jHv7KzGj54I avjH6I4i3U8C9zyL8+Mjp9lI9GfJn2NoGNBOO5Ftqi2LY0fdfA2/kigflGF+KFwrRj2n oCWY9ApDIizINWoip99kFrsJ4Z8Qw6sQD4/N5jbBCWpnM76XUqHVjSAbPwRfv1uVQ2wB BjeaAH4eiQgixubXrOgArZs46TRcgS2b7j6LOaV7oj7ReEZK4QBYEbkc6mRXIxzw3Ftr 5/zg== X-Forwarded-Encrypted: i=1; AHgh+RqgafqKV/fqpf0eOtAr96SQ4sBTmLeKWEoBLBmEdlkMQW7SOABxdPqXFeu9HpEWcrpDu3eqdUWzSyVt8As=@vger.kernel.org X-Gm-Message-State: AOJu0Yyv24foCd5zw1zQLqlVA/EMZ5DzWqiwS5m5XQ3qGGbQYgo6e2vH soU20YcRlmw3gbT3UoRMgG/tI9bk/LyoTaWqwmn/yEyfKStp7phoEIX4sSotR9FO X-Gm-Gg: AR+sD11l0IYrgv/Y6tzOpfz38kyaTE4Iz3w+IDtrhl0aCE0jLK8bFMJKFSJ7vVK9pF2 yYf4AmgaWcfpu3AZFNPpKg2QQV6lZKoWivze2MTLqtxTIOXJWG106lqOIzsOmXtLI4KboZqtya7 wyQzrKoL6px8ngqpLjPZFlXvT8haXTiuO0BJ4FPqM4fDJvI6vWo4aLlOsKQgtc+fhcYH53uuguQ wv+PITi1SvO8XsLY9q5BuHJfwv8EMCQILPb9kg+YZblhvv8D/PFcTT7l92O0lfMBpmkAyeORuiO xkwL30ox9Bzj2Jszp6wEh4jEeTre8zUen3e3WG+lUcVRHMqDqQhT3cv/bo1cdFIEPDNh0Yxuo2r BuRdyAk9gjCaGg13T41Yzqr2v+mojY/oMIq/I+IEyXeRxEQPnPvYz4Lee+w8HTrTef6z+d61egF TunGlB5sknGRhiNwWBQv/6+o57Ay6R3aV34ldr5klvZIj+7r0aImkPhd0= X-Received: by 2002:a05:6a00:e8b:b0:848:86cf:267b with SMTP id d2e1a72fcca58-84ee4956bb8mr138216b3a.61.1785512836463; Fri, 31 Jul 2026 08:47:16 -0700 (PDT) Received: from ubuntu.. ([110.9.142.4]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cbe39eb13dbsm753566a12.29.2026.07.31.08.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 08:47:16 -0700 (PDT) From: Sang-Heon Jeon To: Miklos Szeredi 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 Message-ID: <20260731154440.1117457-1-ekffu200098@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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