Commit a4440d74 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

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: default avatarJeff Layton <jlayton@kernel.org>
Message-Id: <20230705190309.579783-2-jlayton@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent d619f48e
...@@ -294,7 +294,7 @@ static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino) ...@@ -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_size += BFS_DIRENT_SIZE;
dir->i_ctime = current_time(dir); 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); mark_inode_dirty(dir);
de->ino = cpu_to_le16((u16)ino); de->ino = cpu_to_le16((u16)ino);
for (i = 0; i < BFS_NAMELEN; i++) for (i = 0; i < BFS_NAMELEN; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment