]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] ramfs: update dir mtime and ctime
authorAndrew Morton <akpm@osdl.org>
Fri, 24 Feb 2006 21:04:23 +0000 (13:04 -0800)
committerChris Wright <chrisw@sous-sol.org>
Wed, 1 Mar 2006 22:36:36 +0000 (14:36 -0800)
Phil Marek <philipp.marek@bmlv.gv.at> points out that ramfs forgets to update
a directory's mtime and ctime when it is modified.

Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/ramfs/inode.c

index 0a88917605aee65bf36b9314d24f5094a94c5eeb..6c44c5511e552c526b0d4d42ecfa7a9056c6fe45 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/fs.h>
 #include <linux/pagemap.h>
 #include <linux/highmem.h>
+#include <linux/time.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/smp_lock.h>
@@ -105,6 +106,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
                d_instantiate(dentry, inode);
                dget(dentry);   /* Extra count - pin the dentry in core */
                error = 0;
+               dir->i_mtime = dir->i_ctime = CURRENT_TIME;
        }
        return error;
 }