mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 05:25:18 +00:00
scoutfs: update created inode times in mknod
In mknod the newly created inode's times are set down in the new inode creation path instead of up in the mknod path to match the parent dir's ctime and mtime. This is strictly legal but it's easier to test that all the times have been set in the mknod by having them equal. This stops mkdir-interface test failures when enough time passes between inode creation and parent dir timestamp updates to have them differ. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -412,6 +412,7 @@ static int scoutfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
|
||||
|
||||
i_size_write(dir, i_size_read(dir) + dentry->d_name.len);
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = dir->i_mtime;
|
||||
|
||||
if (S_ISDIR(mode)) {
|
||||
inc_nlink(inode);
|
||||
|
||||
Reference in New Issue
Block a user