From 96b8a6da4618c9147da2a0fd738e1462c3f2bafc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 18 Mar 2016 17:21:12 -0700 Subject: [PATCH] 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 --- kmod/src/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kmod/src/dir.c b/kmod/src/dir.c index f1ab3190..921fbdef 100644 --- a/kmod/src/dir.c +++ b/kmod/src/dir.c @@ -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);