mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
BACKPORT: fuse: always revalidate if exclusive create
commit df8629af293493757beccac2d3168fe5a315636e upstream. Failure to do so may result in EEXIST even if the file only exists in the cache and not in the filesystem. The atomic nature of O_EXCL mandates that the cached state should be ignored and existence verified anew. Reported-by: Ken Schalk <kschalk@nvidia.com> Change-Id: I7bc67048363004f94dfe7b74d0873c019f06eaef Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Wu Bo <bo.wu@vivo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
010f25aa35
commit
3a772729dd
1 changed files with 1 additions and 2 deletions
|
|
@ -231,7 +231,6 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
|
|||
inode = d_inode_rcu(entry);
|
||||
if (inode && fuse_is_bad(inode))
|
||||
goto invalid;
|
||||
|
||||
#ifdef CONFIG_FUSE_BPF
|
||||
/* TODO: Do we need bpf support for revalidate?
|
||||
* If the lower filesystem says the entry is invalid, FUSE probably shouldn't
|
||||
|
|
@ -245,7 +244,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
|
|||
}
|
||||
#endif
|
||||
if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) ||
|
||||
(flags & LOOKUP_REVAL)) {
|
||||
(flags & (LOOKUP_EXCL | LOOKUP_REVAL))) {
|
||||
struct fuse_entry_out outarg;
|
||||
struct fuse_entry_bpf bpf_arg;
|
||||
FUSE_ARGS(args);
|
||||
|
|
|
|||
Loading…
Reference in a new issue