]> git.hungrycats.org Git - linux/commitdiff
[PATCH] tmpfs readdir does not update dir atime
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 13:12:47 +0000 (05:12 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 13:12:47 +0000 (05:12 -0800)
From: mark@borgerding.net

Access times of tmpfs dirs do not get updated on readdir.  This can cause
empty dirs to get tmpwatch'd too early, b/c atime never changes even though
the dir is in use.

fs/libfs.c

index 68002d64552e7ce1735be4740937f0dc9bad4f55..475871c787f31a85308af1ad4d43191ba8a0d39a 100644 (file)
@@ -155,6 +155,7 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
                        }
                        spin_unlock(&dcache_lock);
        }
+       update_atime(dentry->d_inode);
        return 0;
 }