--- linux-2.4.22/mm/filemap.c Mon Nov 17 19:18:07 2003 +++ linux/mm/filemap.c Tue Nov 18 13:28:22 2003 @@ -1742,7 +1742,8 @@ } 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; } } @@ -3120,8 +3121,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;