Commit 988a6490 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: set i_ctime & i_mtime on target directory when creating links

jfs has never been setting i_ctime or i_mtime when creating either hard
or symbolic links.  I'm surprised nobody had noticed until now.

Thanks to Chris Spiegel for reporting the problem.
Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
parent f2c84c0e
...@@ -827,6 +827,7 @@ static int jfs_link(struct dentry *old_dentry, ...@@ -827,6 +827,7 @@ static int jfs_link(struct dentry *old_dentry,
/* update object inode */ /* update object inode */
ip->i_nlink++; /* for new link */ ip->i_nlink++; /* for new link */
ip->i_ctime = CURRENT_TIME; ip->i_ctime = CURRENT_TIME;
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
mark_inode_dirty(dir); mark_inode_dirty(dir);
atomic_inc(&ip->i_count); atomic_inc(&ip->i_count);
...@@ -1024,6 +1025,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, ...@@ -1024,6 +1025,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
insert_inode_hash(ip); insert_inode_hash(ip);
mark_inode_dirty(ip); mark_inode_dirty(ip);
dip->i_ctime = dip->i_mtime = CURRENT_TIME;
mark_inode_dirty(dip);
/* /*
* commit update of parent directory and link object * commit update of parent directory and link object
*/ */
......
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