Commit acd1293e authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] tmpfs 3/5 mknod times

shmem_mknod should not update directory times if it cannot get an inode.
parent 467a0077
...@@ -1036,8 +1036,8 @@ static int shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, int d ...@@ -1036,8 +1036,8 @@ static int shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, int d
struct inode * inode = shmem_get_inode(dir->i_sb, mode, dev); struct inode * inode = shmem_get_inode(dir->i_sb, mode, dev);
int error = -ENOSPC; int error = -ENOSPC;
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
if (inode) { if (inode) {
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
dget(dentry); /* Extra count - pin the dentry in core */ dget(dentry); /* Extra count - pin the dentry in core */
error = 0; error = 0;
......
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