mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ANDROID: fuse-bpf: Invalidate if lower is unhashed
If the lower filesystem has deleted a file or folder behind our back, we
should drop it as well.
Bug: 221093504
Test: atest android.hardware.cts.CameraTest#testJpegThumbnailSize
several times in a row
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: Ibd92dea83a82dd7ab21269ae5d2533e4826f5fb7
This commit is contained in:
@@ -1055,6 +1055,13 @@ int fuse_revalidate_backing(struct fuse_args *fa, struct inode *dir,
|
||||
struct fuse_dentry *fuse_dentry = get_fuse_dentry(entry);
|
||||
struct dentry *backing_entry = fuse_dentry->backing_path.dentry;
|
||||
|
||||
spin_lock(&backing_entry->d_lock);
|
||||
if (d_unhashed(backing_entry)) {
|
||||
spin_unlock(&backing_entry->d_lock);
|
||||
return 0;
|
||||
}
|
||||
spin_unlock(&backing_entry->d_lock);
|
||||
|
||||
if (unlikely(backing_entry->d_flags & DCACHE_OP_REVALIDATE))
|
||||
return backing_entry->d_op->d_revalidate(backing_entry, flags);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user