aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ramfs
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-02-24 16:04:23 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:31:39 -0500
commit8dde0509e74ff6044cf1788c917a22facce9f68d (patch)
treee9242b771b1b6b1528090ece3eea6b7659474eb6 /fs/ramfs
parentd4f7796e9b387e471ab0e8ed4e0c2bd616b3c193 (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: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ramfs')
-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 c66bd5e4c05c..cde5d48994ae 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -27,6 +27,7 @@
27#include <linux/fs.h> 27#include <linux/fs.h>
28#include <linux/pagemap.h> 28#include <linux/pagemap.h>
29#include <linux/highmem.h> 29#include <linux/highmem.h>
30#include <linux/time.h>
30#include <linux/init.h> 31#include <linux/init.h>
31#include <linux/string.h> 32#include <linux/string.h>
32#include <linux/smp_lock.h> 33#include <linux/smp_lock.h>
@@ -104,6 +105,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
104 d_instantiate(dentry, inode); 105 d_instantiate(dentry, inode);
105 dget(dentry); /* Extra count - pin the dentry in core */ 106 dget(dentry); /* Extra count - pin the dentry in core */
106 error = 0; 107 error = 0;
108 dir->i_mtime = dir->i_ctime = CURRENT_TIME;
107 } 109 }
108 return error; 110 return error;
109} 111}