summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-02-24 13:04:23 -0800
committerChris Wright <chrisw@sous-sol.org>2006-03-01 14:36:36 -0800
commitb9c53139e460fa93b7b20928f8b49a3cb2432b69 (patch)
tree23f736d120ce7133989c8a7a54905f8b27db1069
parente5a78bb9935a635ebcb71c10899c53bfc99f8c7f (diff)
[PATCH] ramfs: update dir mtime and ctime
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>
-rw-r--r--fs/ramfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 0a88917605ae..6c44c5511e55 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -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;
}