Message ID | 20230612104524.17058-5-jlayton@kernel.org |
---|---|
State | New |
Headers | show
Return-Path: <linux-cifs-owner@vger.kernel.org> 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=<UNKNOWN>) 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=oZstYoY1; 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 4QfpZ22xdXz20Vx for <incoming@patchwork.ozlabs.org>; Mon, 12 Jun 2023 20:58:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237229AbjFLK57 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>); Mon, 12 Jun 2023 06:57:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236875AbjFLK5i (ORCPT <rfc822;linux-cifs@vger.kernel.org>); Mon, 12 Jun 2023 06:57:38 -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 68F63E579; Mon, 12 Jun 2023 03:45:42 -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 F239862450; Mon, 12 Jun 2023 10:45:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C4EAC433EF; Mon, 12 Jun 2023 10:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686566741; bh=aJO98WciVZrVlZcCKv5j2euy0SAQyZ/0j96e4FBSwR4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oZstYoY1+IwPBj84Mr1zP4YDtRIv3werVGAJ2+b6CsAytp4SAJPSGU+zc4JlpYmBP i0I0UZNtMxsP37aH5z4pL54IcZZ1yygHjAAFPKpFU9x2lRdApQdrTuBFVjz/WeesZ7 C3h04CZRRWYbEH7sB4n6OEWq6BaO6VbnwTsQzY8j062H/Fz0/sgsOt4zwb1ayIP6fZ 7cG77M+iHxmvYKtuE/PcT/tB175OdEWjDJjk/JilIiutctTDWoidSZHK1hO15R4iQz 14MIjGOy5mac9sUGgBUCVdt16OnQDBpiwG4wJs6H+LwyCTwvuMy4yWgpjzdVRTkyEd 39wCWXoZtMX3Q== From: Jeff Layton <jlayton@kernel.org> To: Christian Brauner <brauner@kernel.org>, Al Viro <viro@zeniv.linux.org.uk>, Brad Warrum <bwarrum@linux.ibm.com>, Ritu Agarwal <rituagar@linux.ibm.com>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Ian Kent <raven@themaw.net>, "Tigran A. Aivazian" <aivazian.tigran@gmail.com>, Jeremy Kerr <jk@ozlabs.org>, Ard Biesheuvel <ardb@kernel.org>, Namjae Jeon <linkinjeon@kernel.org>, Sungjong Seo <sj1557.seo@samsung.com>, Steve French <sfrench@samba.org>, Paulo Alcantara <pc@manguebit.com>, Ronnie Sahlberg <lsahlber@redhat.com>, Shyam Prasad N <sprasad@microsoft.com>, Tom Talpey <tom@talpey.com>, John Johansen <john.johansen@canonical.com>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com>, Ruihan Li <lrh2000@pku.edu.cn>, Sebastian Reichel <sebastian.reichel@collabora.com>, Alan Stern <stern@rowland.harvard.edu>, Suren Baghdasaryan <surenb@google.com>, Wolfram Sang <wsa+renesas@sang-engineering.com>, 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 4/8] bfs: update ctime in addition to mtime when adding entries Date: Mon, 12 Jun 2023 06:45:20 -0400 Message-Id: <20230612104524.17058-5-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 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: <linux-cifs.vger.kernel.org> X-Mailing-List: linux-cifs@vger.kernel.org |
Series |
fs: add some missing ctime updates
|
expand
|
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 040d5140e426..d2e8a2a56b05 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c @@ -294,7 +294,7 @@ static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino) dir->i_size += BFS_DIRENT_SIZE; dir->i_ctime = current_time(dir); } - dir->i_mtime = current_time(dir); + dir->i_mtime = dir->i_ctime = current_time(dir); mark_inode_dirty(dir); de->ino = cpu_to_le16((u16)ino); for (i = 0; i < BFS_NAMELEN; i++)
When adding entries to a directory, POSIX generally requires that the ctime be updated alongside the mtime. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/bfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)