Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp836893rwd; Thu, 18 May 2023 04:49:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42c7ifvn40JxMeGYD7dZfh3bo/gLMtAKHCvovhjagDdFfR7pBXEqsGiHW+JhRt4upwo9xd X-Received: by 2002:a05:6a20:9593:b0:105:4184:17d4 with SMTP id iu19-20020a056a20959300b00105418417d4mr1792373pzb.19.1684410585066; Thu, 18 May 2023 04:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684410585; cv=none; d=google.com; s=arc-20160816; b=0Ulu8Wnoj5Q2BAPB74qR3rQesDP8zuo8j9iDrN/JukNKy2CvGoO4fExBsWbNYAMtb8 TStog8DbUuaBCUYh6BGHGD0Dy2fEcoW3C2CClsRahEZSrhMTPdugtRQkPWgRXuRk8rIF T/McyB2XOMAqSL3VhySvA5UbdrLb5ltdLNKG1m3Z/ZwVabAe6DBEv9F1Ak9/Uij3bc3J DrhyKXSM34sXVjMLjTHeV/mLXXEF0GStaRPuAKSOQrAEzXGmIzPxFlhuXYrNLH7Gz/JK Nzdx6xqyrTDBpQXLPq+J3PeCakIRT03vNyTrDW6XA/KV8Hg0ZiEGpKAmD8hGLZ8ZsggH 2C9g== 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=IJgQ18FYI+xs9FDD5lKBcw8Ak01NNxhHvPgnEm2MRog=; b=T23NicsUq3jxoB2jDDlyLV7Lc99p7YiUceP8Dcrj5LjNW3SvNS0IqEksAPB0vShGmr n0tu5pKU1UQqn/YvA+sbWayrxl/CYT6zFwgG0j3KlzKFppP4CiAKVY6SEp72m5qoJj9R s7jkaZgq4PrUxVkx/tIAEDRH2wPoczxIVY6vkX1cIADQiYEDeJovpZiJE0chYQgz66Ec xRIJ+DU3SU2duZRyWdxGVYdBBheodRgJTlbNAaFb6PVnfRwhou3zz4o4UIz1kbs9qium Iol2rxYFqavfxJ4dHeHYpke2WU3RakZ27QRAui1w5+7gjt9v9EoPwkJoKrRIfy33u9Gn ENKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pv9NSU1e; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 v3-20020a626103000000b00646df7a783bsi1432643pfb.118.2023.05.18.04.49.28; Thu, 18 May 2023 04:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=pv9NSU1e; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 S231608AbjERLs1 (ORCPT + 99 others); Thu, 18 May 2023 07:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231538AbjERLsR (ORCPT ); Thu, 18 May 2023 07:48:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DECB6173D; Thu, 18 May 2023 04:48:00 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6396B64ED5; Thu, 18 May 2023 11:48:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77283C433A1; Thu, 18 May 2023 11:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684410479; bh=wTAnemCjoVMdBCyfBm7Caga87wrGLLdiUMBAcBipLM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pv9NSU1eFgIMWnOukE0vFtlSJhvEzj0TZb3+gBxSbV4qnUliBKBhdy87cs9IAXHTQ 1dMxyJ0MCSwcxOHa0adG7hzskt16qlLg6oamqDb76RXfskYjsZM5o0JxuTo/WFc897 VcFtzIuIMOGA47SH7EdySeITog2TKUoLRdLffRTpA7WrjOcjjvIVsAT/189C9RgPwh YJ2blX4n6Pm7QyDIP3ewgeAI6b3YJEbz4lUXoiFKczZaUeQvD+QwwzqUFJd6f3EYkC +6ZEtMgGqziZq7hwGRaYwIsAUtBQD/dTP/9CtCnpQcrkIjmmiHoBVgsfu4UY3Vycc5 mjFdNmAgburFQ== From: Jeff Layton To: Alexander Viro , Christian Brauner , "Darrick J. Wong" , Hugh Dickins , Andrew Morton , Dave Chinner , Chuck Lever Cc: Jan Kara , Amir Goldstein , David Howells , Neil Brown , Matthew Wilcox , Andreas Dilger , Theodore T'so , Chris Mason , Josef Bacik , David Sterba , Namjae Jeon , Steve French , Sergey Senozhatsky , Tom Talpey , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Subject: [PATCH v4 5/9] ksmbd: use ctime_peek to grab the ctime out of the inode Date: Thu, 18 May 2023 07:47:38 -0400 Message-Id: <20230518114742.128950-6-jlayton@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230518114742.128950-1-jlayton@kernel.org> References: <20230518114742.128950-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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-ext4@vger.kernel.org This ensures that the flag is masked off in the result. Signed-off-by: Jeff Layton --- fs/ksmbd/smb2pdu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index d39ddb344417..c33128570448 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -4745,7 +4745,7 @@ static int find_file_posix_info(struct smb2_query_info_rsp *rsp, file_info->LastAccessTime = cpu_to_le64(time); time = ksmbd_UnixTimeToNT(inode->i_mtime); file_info->LastWriteTime = cpu_to_le64(time); - time = ksmbd_UnixTimeToNT(inode->i_ctime); + time = ksmbd_UnixTimeToNT(ctime_peek(inode)); file_info->ChangeTime = cpu_to_le64(time); file_info->DosAttributes = fp->f_ci->m_fattr; file_info->Inode = cpu_to_le64(inode->i_ino); @@ -5386,7 +5386,7 @@ int smb2_close(struct ksmbd_work *work) rsp->LastAccessTime = cpu_to_le64(time); time = ksmbd_UnixTimeToNT(inode->i_mtime); rsp->LastWriteTime = cpu_to_le64(time); - time = ksmbd_UnixTimeToNT(inode->i_ctime); + time = ksmbd_UnixTimeToNT(ctime_peek(inode)); rsp->ChangeTime = cpu_to_le64(time); ksmbd_fd_put(work, fp); } else { @@ -5605,7 +5605,7 @@ static int set_file_basic_info(struct ksmbd_file *fp, if (file_info->ChangeTime) attrs.ia_ctime = ksmbd_NTtimeToUnix(file_info->ChangeTime); else - attrs.ia_ctime = inode->i_ctime; + attrs.ia_ctime = ctime_peek(inode); if (file_info->LastWriteTime) { attrs.ia_mtime = ksmbd_NTtimeToUnix(file_info->LastWriteTime); -- 2.40.1