aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-10-31 17:53:04 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2005-10-31 17:53:04 -0500
commit988a6490a793b73ff23aa3baf87b337152178e4d (patch)
treec12631ad5e0914d52434ea7443bb053103411cd7 /fs/jfs
parentf2c84c0e84bfa637a7161eac10157cf3b05b4a73 (diff)
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: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 1abe7343f920..4abbe8604302 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -827,6 +827,7 @@ static int jfs_link(struct dentry *old_dentry,
827 /* update object inode */ 827 /* update object inode */
828 ip->i_nlink++; /* for new link */ 828 ip->i_nlink++; /* for new link */
829 ip->i_ctime = CURRENT_TIME; 829 ip->i_ctime = CURRENT_TIME;
830 dir->i_ctime = dir->i_mtime = CURRENT_TIME;
830 mark_inode_dirty(dir); 831 mark_inode_dirty(dir);
831 atomic_inc(&ip->i_count); 832 atomic_inc(&ip->i_count);
832 833
@@ -1024,6 +1025,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
1024 insert_inode_hash(ip); 1025 insert_inode_hash(ip);
1025 mark_inode_dirty(ip); 1026 mark_inode_dirty(ip);
1026 1027
1028 dip->i_ctime = dip->i_mtime = CURRENT_TIME;
1029 mark_inode_dirty(dip);
1027 /* 1030 /*
1028 * commit update of parent directory and link object 1031 * commit update of parent directory and link object
1029 */ 1032 */