]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ovl: constant d_ino across copy up
authorAmir Goldstein <amir73il@gmail.com>
Thu, 11 May 2017 13:42:27 +0000 (16:42 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 27 Jul 2017 19:54:06 +0000 (21:54 +0200)
commitb5efccbe0a12a9d5c65c1a60b4270837c7fdb900
tree0217b12438c8b44a6949dfc636ce473f33b0e311
parent31e8ccea3cd77c5f997ff61e3a5404653e54b2d5
ovl: constant d_ino across copy up

When all layers are on the same fs, and iterating a directory which may
contain copy up entries, call vfs_getattr() on the overlay entries to make
sure that d_ino will be consistent with st_ino from stat(2).

There is an overhead of lookup per upper entry in readdir.

The overhead is minimal if the iterated entries are already in dcache.  It
is also quite useful for the common case of 'ls -l' that readdir() pre
populates the dcache with the listed entries, making the following stat()
calls faster.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/readdir.c