]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
ramfs directory mtime/ctime fix from akpm
authorChris Wright <chrisw@sous-sol.org>
Sat, 25 Feb 2006 01:13:41 +0000 (17:13 -0800)
committerChris Wright <chrisw@sous-sol.org>
Sat, 25 Feb 2006 01:13:41 +0000 (17:13 -0800)
queue/ramfs-update-dir-mtime-and-ctime.patch [new file with mode: 0644]
queue/series

diff --git a/queue/ramfs-update-dir-mtime-and-ctime.patch b/queue/ramfs-update-dir-mtime-and-ctime.patch
new file mode 100644 (file)
index 0000000..021f0fa
--- /dev/null
@@ -0,0 +1,39 @@
+From stable-bounces@linux.kernel.org  Fri Feb 24 13:09:14 2006
+Date: Fri, 24 Feb 2006 13:04:23 -0800
+From: akpm@osdl.org
+To: torvalds@osdl.org
+Cc: philipp.marek@bmlv.gv.at, stable@kernel.org
+Subject: [PATCH] ramfs: update dir mtime and ctime
+
+
+From: Andrew Morton <akpm@osdl.org>
+
+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 |    2 ++
+ 1 files changed, 2 insertions(+)
+
+--- linux-2.6.15.4.orig/fs/ramfs/inode.c
++++ linux-2.6.15.4/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 de
+               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;
+ }
index 96672a0b67442f8ba622cdc6e2a47aff5f5cc11a..565468a80311e0a103f968323e77f7975c1d273f 100644 (file)
@@ -24,3 +24,4 @@ cfi-init-wait-queue-in-chip-struct.patch
 gbefb-set-default-of-fb_gbe_mem-to-4-mb.patch
 dm-missing-bdput-thaw_bdev-at-removal.patch
 dm-free-minor-after-unlink-gendisk.patch
+ramfs-update-dir-mtime-and-ctime.patch