[PATCH] ramfs needs to update directory m/ctime on symlink
authorPeter Staubach <staubach@redhat.com>
Mon, 6 Mar 2006 23:42:56 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 7 Mar 2006 02:40:45 +0000 (18:40 -0800)
ramfs neglects to update the directory mtime and ctime fields when creating
a new symbolic link.  Ramfs was modified in 2.6.15 to update these fields
when other types of entries are created.  The symlink support is separate
from that other support, so that change did not cover quite all of the
possibilities.

All of the directory content manipulation entry points now seem to be
covered with respect to these time field updates.

Signed-off-by: Peter Staubach <staubach@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ramfs/inode.c

index cde5d48994ae676806034f232775ef662c0cbd15..14bd2246fb6d3403ad2dbe97c36a3988145a0026 100644 (file)
@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
                                inode->i_gid = dir->i_gid;
                        d_instantiate(dentry, inode);
                        dget(dentry);
+                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
                } else
                        iput(inode);
        }