Avoid caching Android/media dentries

When users clear app data, installd deletes the app dir content using
the lower fs. This is a problem for Android/media that is a FUSE file
system, unlike Android/{data,obb}.

The FUSE filesystem may still have a cached dentry for
Android/media/<package> and subsequent requests to recreate the dir
would fail because even though the dir may not exist on the lower
filesystem, there may still be an entry for it in the FUSE VFS dentry
cache.

Now, we set the fuse_entry timeout to 0 so that the kernel never
caches Android/media/* paths. This always causes a lookup on those
paths and may affect performance, however the path is deprecated
anyways and apps shouldn't be using it.

Test: Deleting a dir on Android/media lower fs allows subsequent
creation on the upper fs
Bug: 159101637

Change-Id: Ife887d64a397237b09ae5dfeda2589bcf9e54004
1 file changed