From patchwork Wed Oct 4 11:19:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Guzik X-Patchwork-Id: 148237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp55064vqb; Wed, 4 Oct 2023 04:19:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2hnxbz9F+dhrMMgkS6uXY15LwLblZgf9VtdSysXD74ok63DIk95R+R7NiRMb2d6iSGKNW X-Received: by 2002:a05:6e02:1c08:b0:34f:6dcf:4100 with SMTP id l8-20020a056e021c0800b0034f6dcf4100mr2221207ilh.11.1696418383366; Wed, 04 Oct 2023 04:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696418383; cv=none; d=google.com; s=arc-20160816; b=wsx9HGGKSCZxC07QkAWcwCP4Qae8028FpMoqV25dTEGICj8e8i/nFRxGgDv0KSDGzS QFas87QXIa+VDQhC30FcCFofoHCBdERsxOzlMk6ovhHpsZk2uh+5NSPEISQqDVEYJGMj 7iydMiyOBsmymlF+4Z8iYzPY+PLCk7C/9LPOOQX9derF9mldRatbP9rbnjWogWUEkWLT 3KDNp4NXFeK13b4wKLCsdoarrfyjPSVln+6n4g7lM1PhVPhtZUdmwMsaPhOX85gO2XoX tDnH8Z/hLwDj07+TwT9dIOTqJnP9UJJwnuFwwX+FGSeQi3MZ0Q0yZNzYWCtupUcbDoAq 6HSQ== 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 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g14-20020a056a001a0e00b0068a6eb3b548si3453464pfv.401.2023.10.04.04.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:19:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; 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 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 628A78212AB5; Wed, 4 Oct 2023 04:19:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242242AbjJDLTk (ORCPT + 18 others); Wed, 4 Oct 2023 07:19:40 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 04:19:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778823602255636231 X-GMAIL-MSGID: 1778823602255636231 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 */