From patchwork Fri Jun 9 12:50:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 691089 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 D8FB2C87FE4 for ; Fri, 9 Jun 2023 12:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240783AbjFIMul (ORCPT ); Fri, 9 Jun 2023 08:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237713AbjFIMud (ORCPT ); Fri, 9 Jun 2023 08:50:33 -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 71815210A; Fri, 9 Jun 2023 05:50:32 -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 01BAC657CB; Fri, 9 Jun 2023 12:50:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54684C4339B; Fri, 9 Jun 2023 12:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686315031; bh=hip9OBUVCq8AfrEVIdBD05U3CyPcXD5Vb4CyWwwRC3g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MQ2ViBoypaWzJIm06BN1Xtsc/qeOFaexGyEEzNtKJanH5XPHZxMVbuSDV1uAyIlU4 rbodYRn8EcF+Q2AmfEqxjK7GyHJZ2xmWDBv1YsyfbjumzmCz2ByL26u2fyUJCnJyod ibAOulu974oShLTpyfIEQf8A+54+tiXxg6MGRxQ9DNbTpaIyAjs8D6Y/W/bkDdNGRT 7joDEb/mbY7zrdmS5a0kILBHqLOieXmoNm+OsvaoWwBM+YMYKzDsdQU6+0cmvS+0Nt VEyOYqKAm0U6WIgIpUsgZP+1Y5vqalcMonrvL1MjdTosq1Ge33JXn61E1c8Ah6Ha2S pCTPEiryNspJw== 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 , Bob Peterson , Andreas Gruenbacher , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Ruihan Li , Suren Baghdasaryan , Sebastian Reichel , 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, cluster-devel@redhat.com, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org Subject: [PATCH 1/9] ibmvmc: update ctime in conjunction with mtime on write Date: Fri, 9 Jun 2023 08:50:15 -0400 Message-Id: <20230609125023.399942-2-jlayton@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230609125023.399942-1-jlayton@kernel.org> References: <20230609125023.399942-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org When updating the mtime for a write, you must always update the ctime as well. Signed-off-by: Jeff Layton --- drivers/misc/ibmvmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c index cbaf6d35e854..d7c7f0305257 100644 --- a/drivers/misc/ibmvmc.c +++ b/drivers/misc/ibmvmc.c @@ -1124,7 +1124,7 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer, goto out; inode = file_inode(file); - inode->i_mtime = current_time(inode); + inode->i_mtime = inode->i_ctime = current_time(inode); mark_inode_dirty(inode); dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n",