]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
fuse: invalidate dir dentry after chmod
authorMiklos Szeredi <mszeredi@redhat.com>
Sat, 1 Oct 2016 05:32:32 +0000 (07:32 +0200)
committerIshan Mittal <imittal@nvidia.com>
Fri, 6 Jan 2017 10:14:59 +0000 (15:44 +0530)
commit99ad8dc9001e87dd4a629e32894a47b10414aa19
tree762caacdbf84838c622458d6d862e8e1b69765e2
parent6b41ca38bdcf3f629baf53df5eb22b1d39007174
fuse: invalidate dir dentry after chmod

commit 5e2b8828ff3d79aca8c3a1730652758753205b61 upstream.

Without "default_permissions" the userspace filesystem's lookup operation
needs to perform the check for search permission on the directory.

If directory does not allow search for everyone (this is quite rare) then
userspace filesystem has to set entry timeout to zero to make sure
permissions are always performed.

Changing the mode bits of the directory should also invalidate the
(previously cached) dentry to make sure the next lookup will have a chance
of updating the timeout, if needed.

Reported-by: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c