summaryrefslogtreecommitdiff
path: root/fs/bfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-07-05 15:00:29 -0400
committerChristian Brauner <brauner@kernel.org>2023-07-10 10:04:51 +0200
commita4440d741eb3d65edbcec13f2d8a0384548dd841 (patch)
tree5fb03cce4645eb8c321879d1b433905a0ae22425 /fs/bfs
parentd619f48e7d70919e97259900ca2d591d6165c65d (diff)
bfs: update ctime in addition to mtime when adding entries
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> Message-Id: <20230705190309.579783-2-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/bfs')
-rw-r--r--fs/bfs/dir.c2
1 files changed, 1 insertions, 1 deletions
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++)