Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp538257pxm; Fri, 25 Feb 2022 13:14:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNZqenXLtDB2/9jKzL90DoqscLhfJSTWYvvWIgrAEdVPin6R8NU4BB3w4qw9Scf+QiPARq X-Received: by 2002:a63:f959:0:b0:365:5c84:e4f8 with SMTP id q25-20020a63f959000000b003655c84e4f8mr7768799pgk.312.1645823665252; Fri, 25 Feb 2022 13:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645823665; cv=none; d=google.com; s=arc-20160816; b=t6wIOuq+UfsGA7/4JV5lYHddvYNjOurN88242pg6czSrLsPbLJeiMLz3z3rSXg1ooH FJpnSi6d0y+/Uc/cyHN0iIsUEfcHsFAwgcoCrZxAoSvXMban+vBV7LgsKjKcdCgbkg/T WiKJjfDZmqrVfw0RPtnFbchs5tiSD6JkfzD6exBdAWQohGdb9GcTTW58vKmZINLz0elu lyUSHlPW37z1c5Mk1UQV3y5TMpiEd1BT/JaUZoMzWNOYwbwunnACwpwQx3s4wLUOxkJq bGUXaI/HRz9jP/lnev0WDB9Ii4Uwq1o00mTnqaM6NMgF/SdK1hrpGtvxt7vwdNhlQnr7 gSJg== 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:to:from :dkim-signature; bh=xhqTRKc9oqv2UXxI8W2Dcx2SVIZN3Y4yGbePZw9BdRI=; b=r4XC1zgkjBoZ+3Eugc+EbfoY71NXXTcAMtz5Q/wBzX+VlnEGJ+DFKCFOlEIq1WElKO 45QUekX05/rIjCGPRx1fv4qqXCH6ehRm0FUv6CUnn1joDpkMc59p8nFu3amSCiFphjO5 kcfpNkZsqxIUMy5PY9EZXV5cQaUWycxGo1sFwsOtUL4D2695g2eff1Oc0iA+wrTh3y2X UW1hbo1exUjAzi2C55U3BrHfSBcVTvtdO8CXlvy17Qv8jBWTn1vr5woGqC+BUD6AcNFA LFWvL0zrB/e1bpFfeyxgFdCqhDY2btlR/0IMyckiqVD/M5y1NWX+WS9jiMb56r1guPLK 1i/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ceUw4d2N; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v15-20020a17090a088f00b001bc3ca69298si9260172pjc.83.2022.02.25.13.13.59; Fri, 25 Feb 2022 13:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ceUw4d2N; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232563AbiBYSfS (ORCPT + 99 others); Fri, 25 Feb 2022 13:35:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233335AbiBYSfP (ORCPT ); Fri, 25 Feb 2022 13:35:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417F41A9048 for ; Fri, 25 Feb 2022 10:34:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E0B54B8330C for ; Fri, 25 Feb 2022 18:34:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 424EBC340F3 for ; Fri, 25 Feb 2022 18:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645814077; bh=AkViboMthu16I6ccMD5EDxf5c/hBYqowBXD+650a51k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ceUw4d2NfcCE8i42+DVJ0EdK9vygVYdk7PC0VEmOujurlSNFkrRHm0UknAOLyhxKT SPnohJ1qh/dwBa5NjaBVo5QX9HfcDNLnm1C2hj9OGU/9XJ4Gv58voB3Y7vuTt/sR5Z 5rXG3gOWqxrZDYOE8NgPm85PFxmvCRz1Te76YDfi4D6RR8RqSyQm7A/mfJIFuqcvba KrC5Ir2QyqQXpsbWMbuw7TjRcGSuF2MPnIKBnTLIlg+Gr+myuTNSoOwhOHfOld+nQH PX1EcIdAPhkEZVvWfWRQXiPQhs2RH5XsdeEiZArrfRVkCc82z+K3sj11TqlMbF+1MJ 9do1sK2UgKy5Q== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v8 04/24] NFS: Initialise the readdir verifier as best we can in nfs_opendir() Date: Fri, 25 Feb 2022 13:28:09 -0500 Message-Id: <20220225182829.1236093-5-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220225182829.1236093-4-trondmy@kernel.org> References: <20220225182829.1236093-1-trondmy@kernel.org> <20220225182829.1236093-2-trondmy@kernel.org> <20220225182829.1236093-3-trondmy@kernel.org> <20220225182829.1236093-4-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org From: Trond Myklebust For the purpose of ensuring that opendir() followed by seekdir() work as correctly as possible, try to initialise the readdir verifier in nfs_opendir(). Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 1aa55cac9d9a..1dfbd05081ad 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -89,6 +89,7 @@ static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir NFS_INO_REVAL_FORCED); list_add(&ctx->list, &nfsi->open_files); clear_bit(NFS_INO_FORCE_READDIR, &nfsi->flags); + memcpy(ctx->verf, nfsi->cookieverf, sizeof(ctx->verf)); spin_unlock(&dir->i_lock); return ctx; } -- 2.35.1