From patchwork Wed Jul 5 19:00:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13302768 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13556EB64DD for ; Wed, 5 Jul 2023 19:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233466AbjGETDb (ORCPT ); Wed, 5 Jul 2023 15:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbjGETD2 (ORCPT ); Wed, 5 Jul 2023 15:03:28 -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 69D081985; Wed, 5 Jul 2023 12:03:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D2762616C4; Wed, 5 Jul 2023 19:03:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35903C433C8; Wed, 5 Jul 2023 19:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583799; bh=Y/meLmwCWNAsn5J38ZDDhtkdnkG182kUzNf/PHgf2VI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pM+4NH2Mids4CxpLS5rSap4VcC4ygdGDr8BXUIqOTu8qDZ0KNP0PhUxrSYwjdG2tm TNg4o34B2caVF+Ipkq7ZskuLUN6XwbobArABtlRZCnHavfYBUY123MGBOgOYAqMicm ixxlWo8iaZ0xg49JGuSmrCF+oLZjIFCcD6BahO8Dm1kEIng0qGhfSs1OcTyf3FIBP+ K58HB33IflEhe5BayuDCKNhAkauNUNi4cZHi+QBXYbcMFQtLMEHJcLrXwMULmPWdRS oShNaFMagHkUpIx06ahi+hey20WIelFocVARFoSJuFKOfrj3dq9czS3726+0xGw5jl 4acVjPoiSzdxw== From: Jeff Layton To: Christian Brauner , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Subject: [PATCH v2 06/92] cifs: update the ctime on a partial page write Date: Wed, 5 Jul 2023 15:00:33 -0400 Message-ID: <20230705190309.579783-6-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705190309.579783-1-jlayton@kernel.org> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org POSIX says: "Upon successful completion, where nbyte is greater than 0, write() shall mark for update the last data modification and last file status change timestamps of the file..." Add the missing ctime update. Signed-off-by: Jeff Layton Reviewed-by: Steve French --- fs/smb/client/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 879bc8e6555c..0a5fe8d5314b 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -2596,7 +2596,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to) write_data, to - from, &offset); cifsFileInfo_put(open_file); /* Does mm or vfs already set times? */ - inode->i_atime = inode->i_mtime = current_time(inode); + inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); if ((bytes_written > 0) && (offset)) rc = 0; else if (bytes_written < 0)