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:
Zach Brown
2016-03-18 17:21:12 -07:00
parent 0c0f2b19d5
commit 96b8a6da46

View File

@@ -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);