mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
UPSTREAM: ANDROID: fuse-bpf: Support inotify
Test: fuse_test, atest CtsOsTestCases:android.os.cts.FileObserverTest Bug: 202785178 Signed-off-by: Daniel Rosenberg <drosen@google.com> Signed-off-by: Paul Lawrence <paullawrence@google.com> Signed-off-by: Alessio Balsini <balsini@google.com> Change-Id: I88719a8ab23c2042fb8f50462f023e247aa4b6c3
This commit is contained in:
parent
711aab4fc8
commit
73ed3d189e
3 changed files with 46 additions and 0 deletions
|
|
@ -1026,6 +1026,29 @@ void *fuse_revalidate_finalize(struct fuse_args *fa, struct inode *dir,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int fuse_canonical_path_initialize(struct fuse_args *fa,
|
||||
struct fuse_dummy_io *fdi,
|
||||
const struct path *path,
|
||||
struct path *canonical_path)
|
||||
{
|
||||
fa->opcode = FUSE_CANONICAL_PATH;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fuse_canonical_path_backing(struct fuse_args *fa, const struct path *path,
|
||||
struct path *canonical_path)
|
||||
{
|
||||
get_fuse_backing_path(path->dentry, canonical_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *fuse_canonical_path_finalize(struct fuse_args *fa,
|
||||
const struct path *path,
|
||||
struct path *canonical_path)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int fuse_mknod_initialize(
|
||||
struct fuse_args *fa, struct fuse_mknod_in *fmi,
|
||||
struct inode *dir, struct dentry *entry, umode_t mode, dev_t rdev)
|
||||
|
|
|
|||
|
|
@ -331,6 +331,19 @@ static void fuse_dentry_canonical_path(const struct path *path, struct path *can
|
|||
char *path_name;
|
||||
int err;
|
||||
|
||||
|
||||
#ifdef CONFIG_FUSE_BPF
|
||||
struct fuse_err_ret fer;
|
||||
|
||||
fer = fuse_bpf_backing(inode, struct fuse_dummy_io,
|
||||
fuse_canonical_path_initialize,
|
||||
fuse_canonical_path_backing,
|
||||
fuse_canonical_path_finalize, path,
|
||||
canonical_path);
|
||||
if (fer.ret)
|
||||
return;
|
||||
#endif
|
||||
|
||||
path_name = (char *)get_zeroed_page(GFP_KERNEL);
|
||||
if (!path_name)
|
||||
goto default_path;
|
||||
|
|
|
|||
|
|
@ -1521,6 +1521,16 @@ int fuse_revalidate_backing(struct fuse_args *fa, struct inode *dir,
|
|||
void *fuse_revalidate_finalize(struct fuse_args *fa, struct inode *dir,
|
||||
struct dentry *entry, unsigned int flags);
|
||||
|
||||
int fuse_canonical_path_initialize(struct fuse_args *fa,
|
||||
struct fuse_dummy_io *fdi,
|
||||
const struct path *path,
|
||||
struct path *canonical_path);
|
||||
int fuse_canonical_path_backing(struct fuse_args *fa, const struct path *path,
|
||||
struct path *canonical_path);
|
||||
void *fuse_canonical_path_finalize(struct fuse_args *fa,
|
||||
const struct path *path,
|
||||
struct path *canonical_path);
|
||||
|
||||
struct fuse_getattr_io {
|
||||
struct fuse_getattr_in fgi;
|
||||
struct fuse_attr_out fao;
|
||||
|
|
|
|||
Loading…
Reference in a new issue