From: Andrew Morton Date: Fri, 24 Feb 2006 21:04:23 +0000 (-0800) Subject: [PATCH] ramfs: update dir mtime and ctime X-Git-Tag: v2.6.15.5~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9c53139e460fa93b7b20928f8b49a3cb2432b69;p=thirdparty%2Fkernel%2Fstable.git [PATCH] ramfs: update dir mtime and ctime Phil Marek points out that ramfs forgets to update a directory's mtime and ctime when it is modified. Cc: Signed-off-by: Andrew Morton Signed-off-by: Chris Wright --- diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index 0a88917605aee..6c44c5511e552 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -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; }