[PATCH 1/1] JFS: set i_ctime & i_mtime on target directory when creating links

[email protected] (Dave Kleikamp) Mon, 7 Nov 2005 14:48:05 -0600 (CST)
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
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 <[email protected]>

---
commit 988a6490a793b73ff23aa3baf87b337152178e4d
tree c12631ad5e0914d52434ea7443bb053103411cd7
parent f2c84c0e84bfa637a7161eac10157cf3b05b4a73
author Dave Kleikamp <[email protected]> Mon, 31 Oct 2005 16:53:04 -0600
committer Dave Kleikamp <[email protected]> Mon, 31 Oct 2005 16:53:04 -0600

 fs/jfs/namei.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -827,6 +827,7 @@ static int jfs_link(struct dentry *old_d
 	/* update object inode */
 	ip->i_nlink++;		/* for new link */
 	ip->i_ctime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
 	mark_inode_dirty(dir);
 	atomic_inc(&ip->i_count);
 
@@ -1024,6 +1025,8 @@ static int jfs_symlink(struct inode *dip
 	insert_inode_hash(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
 	 */


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php