--- include/linux/fs.h.orig	Wed Mar 20 20:36:18 2002
+++ include/linux/fs.h	Wed Mar 20 21:39:54 2002
@@ -159,7 +159,7 @@
 #define IS_NOQUOTA(inode)	((inode)->i_flags & S_NOQUOTA)
 #define IS_APPEND(inode)	((inode)->i_flags & S_APPEND)
 #define IS_IMMUTABLE(inode)	((inode)->i_flags & S_IMMUTABLE)
-#define IS_NOATIME(inode)	(__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME))
+#define IS_NOATIME(inode)	(current->noatime || __IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME))
 #define IS_NODIRATIME(inode)	__IS_FLG(inode, MS_NODIRATIME)
 
 #define IS_DEADDIR(inode)	((inode)->i_flags & S_DEAD)
--- include/linux/sched.h.orig	Wed Mar 20 20:36:20 2002
+++ include/linux/sched.h	Wed Mar 20 21:39:54 2002
@@ -410,6 +410,9 @@
 
 /* journalling filesystem info */
 	void *journal_info;
+
+/* don't update atimes */
+	int noatime:1;
 };
 
 /*
--- fs/proc/root.c.orig	Wed Mar 20 22:29:59 2002
+++ fs/proc/root.c	Wed Mar 20 22:50:39 2002
@@ -18,6 +18,7 @@
 #include <asm/bitops.h>
 
 struct proc_dir_entry *proc_net, *proc_bus, *proc_root_fs, *proc_root_driver;
+static struct proc_dir_entry *proc_noatime;
 
 #ifdef CONFIG_SYSCTL
 struct proc_dir_entry *proc_sys_root;
@@ -25,6 +26,43 @@
 
 static DECLARE_FSTYPE(proc_fs_type, "proc", proc_read_super, FS_SINGLE);
 
+static int proc_read_noatime(char *buf, char **start,
+	off_t fpos, int length, int *eof, void *data)
+{
+	int len = 0;
+
+	len = sprintf(buf, "%d\n", !!current->noatime);
+
+	if (fpos >= len) {
+		*start = buf;
+		*eof = 1;
+		return 0;
+	}
+	*start = buf + fpos;
+	if ((len -= fpos) > length)
+		return length;
+	*eof = 1;
+	return len;
+}
+
+static int proc_write_noatime(struct file *file,
+	const char *buffer, unsigned long count, void *data)
+{
+	if(count == 0) return 0;
+
+	switch(buffer[0]) {
+		case '0':
+			current->noatime = 0;
+			break;
+		case '1':
+			current->noatime = 1;
+			break;
+	}
+	return count;
+}
+
+
+
 void __init proc_root_init(void)
 {
 	int err = register_filesystem(&proc_fs_type);
@@ -62,6 +100,12 @@
 	proc_rtas_init();
 #endif
 	proc_bus = proc_mkdir("bus", 0);
+
+	proc_noatime = create_proc_entry("noatime", S_IFREG | S_IRUGO | S_IWUSR, NULL);
+	if(proc_noatime) {
+		proc_noatime->read_proc = proc_read_noatime;
+		proc_noatime->write_proc = proc_write_noatime;
+	}
 }
 
 static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry)
