Commit e403771c authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] Catch a few more cases where we need to renew inode->d_time

fs/nfs/dir.c:

   - Call nfs_renew_times() when we deliberately create a negative dentry.
     or rename a file.
parent 9ec4b1b0
...@@ -563,6 +563,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) ...@@ -563,6 +563,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
nfs_complete_unlink(dentry); nfs_complete_unlink(dentry);
unlock_kernel(); unlock_kernel();
} }
/* When creating a negative dentry, we want to renew d_time */
nfs_renew_times(dentry);
iput(inode); iput(inode);
} }
...@@ -1090,6 +1092,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1090,6 +1092,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
d_rehash(rehash); d_rehash(rehash);
if (!error && !S_ISDIR(old_inode->i_mode)) if (!error && !S_ISDIR(old_inode->i_mode))
d_move(old_dentry, new_dentry); d_move(old_dentry, new_dentry);
nfs_renew_times(new_dentry);
/* new dentry created? */ /* new dentry created? */
if (dentry) if (dentry)
......
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