]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: use mtime for readdir cache verification
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:04 +0000 (10:07 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:04 +0000 (10:07 +0200)
commit936cde7fd99b7baa3f61e3a2db226bfc64ff7de8
treebded501b21b8493499fb0eda642fae6fdd2413b8
parent1817d9cef69beee887bed0aeae657f1f5e841ba5
fuse: use mtime for readdir cache verification

Store the modification time of the directory in the cache, obtained before
starting to fill the cache.

When reading the cache, verify that the directory hasn't changed, by
checking if current modification time is the same as the one stored in the
cache.

This only needs to be done when the current file position is at the
beginning of the directory, as mandated by POSIX.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/fuse_i.h
fs/fuse/readdir.c