From patchwork Fri Sep 22 04:12:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 143258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5407456vqi; Fri, 22 Sep 2023 01:30:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfpxPP5pG5+3G2S2jiwc8iMUBfPzzR+pJR1Gpj+OskqFwhAbQ8zq752XPhA1tDQLsrll7L X-Received: by 2002:a17:90a:bb13:b0:277:1070:7490 with SMTP id u19-20020a17090abb1300b0027710707490mr766551pjr.44.1695371441259; Fri, 22 Sep 2023 01:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695371441; cv=none; d=google.com; s=arc-20160816; b=ZzU8kiqXw9o2jvIsH/vpBWkr9lczXndmCJXskC0Rn3ZkSpB7yXHiQRXjRLtjjnHS79 qiATN5h2CK4PeV5HoOIaOlgpqDca1P8WQL3Y4ooRhXmtXKsoMhmkR88pm3i+g5toZY0W 9LXpqEfIICku3xJ7N1OvGbmYcRRWgCAp68/85oRZ3BoIbhVUFM/mxefutN8IstPIoUou xRyNneK4jjB3YV/SYU1SNq3a9b3RxB91k4K6rUqSwtA4456WmHzDgv0pssoBPByf7iqM X1bXEojB2Tf5migsLMltJ+pMLQN2V/D3PfgOKOrbgskggQwb8uyb7FljMUFrXtxwcs9R lO7g== 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 :feedback-id:dkim-signature:dkim-signature; bh=TVdA8h0DNl8QhVA+dGkTgVhkAap2oNQG0MwE5XL5kpw=; fh=tOzwWtfY/Ihw0ZG9uDufqX7N1fYPvJMmg28cxm4BgX4=; b=mbZf5voqDfCsdD49244xQmkfSHLlgpH0T8JE6xTvBoAtDIkycoPSwEIfHxUJ0ifhHd 8B9BWlTwA8EDBgukjiyOruwpr7r3cZo7QFHLk/BCaRmOS1FpuGSvP+SABoKkkBrNLQ+W PzO4waZfNqnuCYjRuBnHWk0CsTLLo2daWiG3FG+29ioh6dF8XWOaIMuJIxGJM3PlI2E1 nR3hS6AvgTWq4lyrJnoulIjutXOBuO6dQW2pPWmm4Kykrn0L/3mci4JYbh1hKUjkqMl7 qEF8w0CcTN9o5VlGJJaKNOv4ScycoITNi93LVWqsp9HtGwO3PzPUKz5OZ+NctzwYAqxJ NfzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm1 header.b=iKyjMpSd; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=L7OBvXe8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id lp15-20020a17090b4a8f00b002634977e6e5si6194088pjb.142.2023.09.22.01.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 01:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@themaw.net header.s=fm1 header.b=iKyjMpSd; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=L7OBvXe8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0EE4A83D4A6C; Thu, 21 Sep 2023 21:14:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjIVEOH (ORCPT + 30 others); Fri, 22 Sep 2023 00:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbjIVENc (ORCPT ); Fri, 22 Sep 2023 00:13:32 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D6C3E5C; Thu, 21 Sep 2023 21:13:07 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D51735C026A; Fri, 22 Sep 2023 00:13:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 22 Sep 2023 00:13:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1695355986; x= 1695442386; bh=TVdA8h0DNl8QhVA+dGkTgVhkAap2oNQG0MwE5XL5kpw=; b=i KyjMpSdhrt3uQsxr6T6UxoeYCbayRCf6SkJDZKUT4DjCRR4XZI7A4vp6vVa7IWY2 iAlx/Z5r7iLqsma8ChIdZ0uHbC6hqEiGT/J1VYhxYkNNsvNnRIPgkWk0gKhsIDFY WtgUstVwu6J+U17BBmdF06sF2Pr9eCAEbdMGKuA5YupM4mj7WfP9lz7h29e4/9Na +B2kmRJo1xVJ9ygM6cmPc2LT4bNSqqh9Y6BKwROZfdep7y87BBdKrPW6OTdFRRbQ iRE+MQi//Uy3JQhSGl/sLN0+4R06QVi0eVulUtvzfmVGOoEWmU/ZNJ87zlOmYE5V g3+OU2puQL+OQocE6EgZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1695355986; x= 1695442386; bh=TVdA8h0DNl8QhVA+dGkTgVhkAap2oNQG0MwE5XL5kpw=; b=L 7OBvXe8GQHWpMoWy0wgEbjaCZ212zowRiQ+RXQILK5CTv+qTNNaMNV3LMpx2ZncF jcH4elhoAb8due9ZEchpzGG0xafIPAKpgC31HpEZFHO/ASLmmanGazJslyE/WI5n pvXZ0OuFQyrOS8IjBkEJQOO5EP43Q9g9zzW5Q6bKwIzKOS406f4Q3WDVv+vTRuVq AGPpUhHDDoqaauZLdG3SxtmsGpOyog7/Zvc7YGXstxk0v+loWIjiLoviaLido0ft aOOR5cQmcvvdJhcqoD0M87w4DOvu5Gd+cavaQG8nXyEaQC936trU16dw+7H4ofvP 1nUnDIL5R22VvFGLFSWQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekjedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepkfgrnhcu mfgvnhhtuceorhgrvhgvnhesthhhvghmrgifrdhnvghtqeenucggtffrrghtthgvrhhnpe duleegueffgfehudeufedtffeiudfghfejgeehvdffgefgjeetvdfffeeihfdvveenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghvvghnse hthhgvmhgrfidrnhgvth X-ME-Proxy: Feedback-ID: i31e841b0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Sep 2023 00:13:02 -0400 (EDT) From: Ian Kent To: Al Viro , Christian Brauner Cc: autofs mailing list , linux-fsdevel , Kernel Mailing List , Bill O'Donnell , Miklos Szeredi , David Howells , Ian Kent Subject: [PATCH 8/8] autofs: fix protocol sub version setting Date: Fri, 22 Sep 2023 12:12:15 +0800 Message-ID: <20230922041215.13675-9-raven@themaw.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230922041215.13675-1-raven@themaw.net> References: <20230922041215.13675-1-raven@themaw.net> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Thu, 21 Sep 2023 21:14:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777725804469087834 X-GMAIL-MSGID: 1777725804469087834 There were a number of updates to protocol version 4, take account of that when setting the super block info sub version field. Signed-off-by: Ian Kent --- fs/autofs/inode.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 3f2dfed428f9..53c0df354206 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -279,7 +279,17 @@ static int autofs_validate_protocol(struct fs_context *fc) sbi->version = AUTOFS_MAX_PROTO_VERSION; else sbi->version = sbi->max_proto; - sbi->sub_version = AUTOFS_PROTO_SUBVERSION; + + switch (sbi->version) { + case 4: + sbi->sub_version = 7; + break; + case 5: + sbi->sub_version = AUTOFS_PROTO_SUBVERSION; + break; + default: + sbi->sub_version = 0; + } return 0; }