Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2532539rdb; Wed, 4 Oct 2023 04:23:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHW9S9POYdnz4HWBwSl49Bl3UMjzVZIQWDVm4mX7hPCk3Cli9Y4FIqZI8gv7sw+CzLRrDcH X-Received: by 2002:a05:6a00:1781:b0:690:2e46:aca3 with SMTP id s1-20020a056a00178100b006902e46aca3mr2470678pfg.25.1696418597569; Wed, 04 Oct 2023 04:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696418597; cv=none; d=google.com; s=arc-20160816; b=OFtTeH6yHnShjKB33TX/YLanWLk9ojhdrR9L70bPgwDcxdN8OKophm9lDZCZ4ls5W2 glkEaOQHm9Uk/ma0nlrbmhfhyZn976sdLAQ3qNNUUcqR7ZphUbJQpcKWCZW4uIAUl8n1 6jlEbVoUcm8RFOb1ZFa+0EIIkO1Go8xJS1gQE1k+4LcQq94WkGtX1WGQhcW5Ntwqi4KI b60iSETt+vd3/Yw8iP+OmfH4U4XekYnecSjaqkFqwYsCZNr2Bt1U4tZxZXbkwJhKclfT Sioe5jxukPBc9Iy494eijJ1+2E+jgRg7wPYOb5mUGA2sKAimX1ccG9TI5d4zmAK7agiS kszg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kf65/yVeNmyfkA4lS1pa8yQ0o4/BpEGkDZRgGsIHS3U=; fh=u0ivogzYbldFMm0SQ5Yx8JuIPu9MbRkx9T4GdN1pW8I=; b=gIjLIE5My/J3KaTNQaPMW0XPZRbSh7i8WmQYIKk0qwZIV/5Mg/FVnPhPyF8f/b1qML 4X/b8UGbP+vave+zHejvRuUZFYaX70MYTF9X25JCAuA9jf7XWwLENyQQO03XX9ikvokc ycU9MzpJjSRSiFlM2W/T5+P8vZt93/tAdeD78UoYQU/VBzG9BmkrBiYcJMEydUw+FuVn 6RbOss6dRdEWby3ZDupGpM3I0EcAMJPlZA6EbiCZco3duZWL5hOq72tklKr8JF3HJ/t0 wGrqKf8X8Os5HSSh9g15+rtObw7547/S08qMZUH+fbhhliMOkoGngDxfQYeXITAzpxkv j24w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R15xLWN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v135-20020a63618d000000b005775e17f560si3399248pgb.82.2023.10.04.04.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R15xLWN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8E4BC819E4C5; Wed, 4 Oct 2023 04:23:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242241AbjJDLTj (ORCPT + 99 others); Wed, 4 Oct 2023 07:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233041AbjJDLTj (ORCPT ); Wed, 4 Oct 2023 07:19:39 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6090AA6; Wed, 4 Oct 2023 04:19:35 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3247d69ed2cso1979923f8f.0; Wed, 04 Oct 2023 04:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696418374; x=1697023174; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kf65/yVeNmyfkA4lS1pa8yQ0o4/BpEGkDZRgGsIHS3U=; b=R15xLWN6GjHcO9jTCsl53ZZB3fKJ9UQ6Vcb70YIu7rfvArk6poxv2OM7FEnlVEzVQh s2qAk6acFv1gmuV06eExFHxuxlMqR1AAAU46sKzdgor0pJuk1IN87OfuoMj+hdXuSUwv CTmkDVIv9p8t27xeCIjigD6AG1tCnRlnAhmO5fM4UPHQq/e294g6m0oFlyUlXxZGFjws K4QnZ8EmISZ30lE2LQcNOvKq4rEQ6C8Tqlje0+FD72OnZGIjPE+RnMq6c+Ag1MtkGm3T D3xRVM7VOBgJP5Ep21icx5iYCLx6fMvls0zuW6Zs9K9b3f7KqGHZkDm5nIxj8zJFl65H uawQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696418374; x=1697023174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kf65/yVeNmyfkA4lS1pa8yQ0o4/BpEGkDZRgGsIHS3U=; b=Rra/HK/Y3atdHjwDyv41QiikENaqRmraQUbaPQyfzYVLHmHihWwe8N2Sutb+cAUYTn PMUQBwT9ppypnLFAvAO3Ih/e+Xw9xiVYJqy3emDSMJ6McOoz8kSWgYccbAwCiGANDDkM G34N2U6B8tnDxPLU2WgJSBWP6P95g9EuVQdG17xCUDYqthgVQfDSDjAjgxdYD8jhnc6Q /C/E+fIw3YQVbyi3rgERLd8MTr7Ei6nlr0ukuDaWHh+T3fPouJ3727f1u1AxrU3b0mFy 2qdDnLk6nFmmS4118I85NUsr9IH+NaH2eovncGl+zsy9lCUDt0gmI4dEXsjQ0cu9NKXW VJIw== X-Gm-Message-State: AOJu0YxNgU01VhmcTBLPguGyqC11nJ24c80vnEHPJKXE6l2AE1dYNvbU i1PAfC/suqJUnt8IjcqePNk= X-Received: by 2002:adf:fe88:0:b0:319:f9d6:a769 with SMTP id l8-20020adffe88000000b00319f9d6a769mr1981989wrr.45.1696418373766; Wed, 04 Oct 2023 04:19:33 -0700 (PDT) Received: from f.. (cst-prg-67-191.cust.vodafone.cz. [46.135.67.191]) by smtp.gmail.com with ESMTPSA id o16-20020adfead0000000b003266ece0fe2sm3761527wrn.98.2023.10.04.04.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:19:33 -0700 (PDT) From: Mateusz Guzik To: brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Mateusz Guzik Subject: [PATCH 1/2] vfs: predict the error in retry_estale as unlikely Date: Wed, 4 Oct 2023 13:19:15 +0200 Message-Id: <20231004111916.728135-2-mjguzik@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231004111916.728135-1-mjguzik@gmail.com> References: <20231004111916.728135-1-mjguzik@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 04:23:15 -0700 (PDT) Signed-off-by: Mateusz Guzik --- include/linux/namei.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/namei.h b/include/linux/namei.h index 1463cbda4888..689b16f3031b 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -112,7 +112,7 @@ static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) static inline bool retry_estale(const long error, const unsigned int flags) { - return error == -ESTALE && !(flags & LOOKUP_REVAL); + return unlikely(error == -ESTALE && !(flags & LOOKUP_REVAL)); } #endif /* _LINUX_NAMEI_H */ -- 2.39.2