From patchwork Mon Jun 12 10:45:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Layton X-Patchwork-Id: 1793867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Sv98hIAW; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4QfpZ570tYz20Vx for ; Mon, 12 Jun 2023 20:58:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237260AbjFLK6D (ORCPT ); Mon, 12 Jun 2023 06:58:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236903AbjFLK5j (ORCPT ); Mon, 12 Jun 2023 06:57:39 -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 8EA3EE57D; Mon, 12 Jun 2023 03:45:45 -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 23BE962418; Mon, 12 Jun 2023 10:45:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5433C433D2; Mon, 12 Jun 2023 10:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686566744; bh=9ZN85s2F3/oEy5pkv6yI4Tv5XU9EfGqK4A7t1kaGRdY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Sv98hIAW85F4HBftzDcqOyvM/R3EukSSckezqktp1nVmTUG16TJv0cTmZ7SZqrheb d4IypswNbwiWEDy/oOarsubCsCA3ax3zQ3H9iLKzVTYSmCKzyXYNS/5sahPEso7cuj 2VuMf+UQPbv18bzClnCD63+Vm3dpGSjDADvHTxD0cbM7bauFma36sYcKjJBaAT7/JB bPGjUyszcMJqtojtlNPoeTxFbjM4KhWRNKx0efDE8UgBAAQbbgtog1Y5rePrnTS841 IkhITd1epcN0mh1bQ6Jk4cLEMA1nMm2CbuaTOSCBgqEts5gyguTJNTvyuSzqq9k91F PZ1odKwWKFr2A== From: Jeff Layton To: Christian Brauner , Al Viro , Brad Warrum , Ritu Agarwal , Arnd Bergmann , Greg Kroah-Hartman , Ian Kent , "Tigran A. Aivazian" , Jeremy Kerr , Ard Biesheuvel , Namjae Jeon , Sungjong Seo , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Ruihan Li , Sebastian Reichel , Alan Stern , Suren Baghdasaryan , Wolfram Sang , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, autofs@vger.kernel.org, linux-efi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org Subject: [PATCH v2 5/8] efivarfs: update ctime when mtime changes on a write Date: Mon, 12 Jun 2023 06:45:21 -0400 Message-Id: <20230612104524.17058-6-jlayton@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230612104524.17058-1-jlayton@kernel.org> References: <20230612104524.17058-1-jlayton@kernel.org> MIME-Version: 1.0 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-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 --- fs/efivarfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c index d57ee15874f9..375576111dc3 100644 --- a/fs/efivarfs/file.c +++ b/fs/efivarfs/file.c @@ -51,7 +51,7 @@ static ssize_t efivarfs_file_write(struct file *file, } else { inode_lock(inode); i_size_write(inode, datasize + sizeof(attributes)); - inode->i_mtime = current_time(inode); + inode->i_mtime = inode->i_ctime = current_time(inode); inode_unlock(inode); }