aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2021-04-26 18:20:21 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2021-08-10 10:21:30 +0200
commit9011c2791e63fc05721b545c41ad025d8073566e (patch)
tree4168367806b39326e1abebf0607eb1b39ec5369f /fs/reiserfs
parentLinux 5.14-rc1 (diff)
downloadlinux-dev-9011c2791e63fc05721b545c41ad025d8073566e.tar.xz
linux-dev-9011c2791e63fc05721b545c41ad025d8073566e.zip
ovl: skip stale entries in merge dir cache iteration
On the first getdents call, ovl_iterate() populates the readdir cache with a list of entries, but for upper entries with origin lower inode, p->ino remains zero. Following getdents calls traverse the readdir cache list and call ovl_cache_update_ino() for entries with zero p->ino to lookup the entry in the overlay and return d_ino that is consistent with st_ino. If the upper file was unlinked between the first getdents call and the getdents call that lists the file entry, ovl_cache_update_ino() will not find the entry and fall back to setting d_ino to the upper real st_ino, which is inconsistent with how this object was presented to users. Instead of listing a stale entry with inconsistent d_ino, simply skip the stale entry, which is better for users. xfstest overlay/077 is failing without this patch. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Link: https://lore.kernel.org/fstests/CAOQ4uxgR_cLnC_vdU5=seP3fwqVkuZM_-WfD6maFTMbMYq=a9w@mail.gmail.com/ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/reiserfs')
0 files changed, 0 insertions, 0 deletions