Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29496219rwd; Wed, 5 Jul 2023 12:44:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65H+lJbcJu9KnE/9vVIw35YwqmrMlWMsas9HaM+BcGc28RRiaPJyykk4NdAJgWhs6HxNw7 X-Received: by 2002:a05:6a21:78a7:b0:129:b68b:92df with SMTP id bf39-20020a056a2178a700b00129b68b92dfmr12439470pzc.48.1688586270135; Wed, 05 Jul 2023 12:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688586270; cv=none; d=google.com; s=arc-20160816; b=JJJ1SqWTWrzzECoAqRwyLU1IfXUMOd0Tr/VXfsMFyPNg9kR/4Oqxg1y3NnrgIz17Qn CXrFcqEM0spYB/csKPjbgeuQvHZBK0fRZho11dBKsY9T18fAU1AniuQWqxSIdiv4QNVn l+izV4K2v+vgv8uIsXjrDtFg0WFB8WLGQZCe3uR9w11l+GgZaS6IDjnCh7vpASDH4EEi QhvJySvnyQAwMGsLKqydqqmzFZN+N5o68YafhQuCAQX7KDIjKaFgjB82a36pXjeybMB9 huIjWLqU9LFcBujpsnQ3jIDqQ1Cw0pcjMfYRn32JWs1cRHuUQIMYs0gi0iAlRqsu1udV NFsA== 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=OIxLC7hSnbfyV1KtKOhCN8czWoPZE32wN8VCxL6W1yk=; fh=AzeZTaQ1KKvSmmikrtHSu0y2fSYyJQkmMYXLo/U8qIs=; b=OxyNSTA0W+FxFo/Z+fRQIftR/6lj1Q3+xHpjGGhhnnwawhzlZhD2JtsihsgB3GCzST wr3bJOqefqvNARtdc0NQSI7g49yTSfZ3QqKEvRRX2h8Ir5v5O6y95Wzj6MSx6lEjOQGp hgJPCzJ7uSl5+bvFadxZcUFd+kz6TMdz7pHbPgLQ6ELlDYcjRxynL+QcDJIecC+N60Ff LCb/Wu3Xa135h8ewyyvr+KGjO78hYlkcyb1/QD4HYAEFXQIbSoNOv2DQGzKdIdReH53h rBjBv0A41Ci8E9ZKlbQYeoPVaI3MQr4j/Kuk8jrQ6ohUBvW0HGJniSGK/eYAMEH85CLo 08kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lUNvfNyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 d16-20020a170903231000b001b895336438si8254866plh.112.2023.07.05.12.44.15; Wed, 05 Jul 2023 12:44:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=lUNvfNyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233446AbjGETDW (ORCPT + 99 others); Wed, 5 Jul 2023 15:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233327AbjGETDS (ORCPT ); Wed, 5 Jul 2023 15:03:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A12DFE6E; Wed, 5 Jul 2023 12:03:13 -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 3D73C616E4; Wed, 5 Jul 2023 19:03:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08E8AC433C8; Wed, 5 Jul 2023 19:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583792; bh=HfiQXchZVgUdW2X7NFM83sYUqCp8My1ze+VPJQDRphQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lUNvfNyPT7W1MfeOCkDDT+DJnubUSlCH5fU4mFL4FRFG5h6LgjKonwHhqo7TNh5hN B+MiEAv22iPTlc2u5YfqIJNc2XtG6I038fBfVm6lJB/eP4QSwogDytyD88KahvHbrI VI8+NGIFDp/304cSkuaqDfeLob81nMQNJgSAS4h9FhrzuasAe4S1BbjrpRfg9duB+W 5k1GhWLMaCUZQXbMhBE29rg5uEXnl/5BQdp8qOtlnNRjV6bTJxrYrYgUxzmDKhZpsZ W32RS/IiQM+54sesxu5H7pOsVXojcLfgGF2ZTJf9t/XeIF2s3BxIJSPPJUsesmUk73 hSpMEDvO02xmA== From: Jeff Layton To: Christian Brauner , "Tigran A. Aivazian" Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/92] bfs: update ctime in addition to mtime when adding entries Date: Wed, 5 Jul 2023 15:00:29 -0400 Message-ID: <20230705190309.579783-2-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org When adding entries to a directory, POSIX generally requires that the ctime be updated alongside the mtime. Signed-off-by: Jeff Layton --- fs/bfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) -- 2.41.0