--- linux-2.4.26-rc1/mm/filemap.c	Wed Mar 31 13:39:35 2004
+++ linux/mm/filemap.c	Wed Mar 31 13:47:37 2004
@@ -1809,7 +1809,8 @@
 			retval = do_generic_direct_read(filp, buf, count, ppos);
 		up(&inode->i_sem);
 		up_read(&inode->i_alloc_sem);
-		UPDATE_ATIME(filp->f_dentry->d_inode);
+		if (!S_ISBLK(inode->i_mode))
+			UPDATE_ATIME(filp->f_dentry->d_inode);
 		goto out;
 	}
 }
@@ -3187,8 +3188,12 @@
 		goto out;
 
 	remove_suid(inode);
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
-	mark_inode_dirty_sync(inode);
+
+	/* Don't update times for block devices using O_DIRECT */
+	if (!(file->f_flags & O_DIRECT) || !S_ISBLK(inode->i_mode)) {
+		inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+		mark_inode_dirty_sync(inode);
+	}
 
 	do {
 		unsigned long index, offset;
