ANDROID: fuse: Fix the issue of fuse_dentry_canonical_path
The d_canonical_path is added for Android. The another fuse daemon
such as ntfs.3g do not implement it. The fsnotify can not work when
using those fuse daemon.
Fixes: aca265111a
("ANDROID: fuse: Add support for d_canonical_path")
Change-Id: I4244431fa1520b5bc33e07da456b3062b635dc5c
Signed-off-by: chenyuwen <chenyuwen1@meizu.com>
This commit is contained in:
parent
5eb1cbb384
commit
016b640235
@ -426,7 +426,12 @@ static int fuse_dentry_canonical_path(const struct path *path,
|
||||
|
||||
#ifdef CONFIG_FUSE_BPF
|
||||
struct fuse_err_ret fer;
|
||||
#endif
|
||||
|
||||
if (fm->fc->no_dentry_canonical_path)
|
||||
goto out;
|
||||
|
||||
#ifdef CONFIG_FUSE_BPF
|
||||
fer = fuse_bpf_backing(inode, struct fuse_dummy_io,
|
||||
fuse_canonical_path_initialize,
|
||||
fuse_canonical_path_backing,
|
||||
@ -453,9 +458,13 @@ static int fuse_dentry_canonical_path(const struct path *path,
|
||||
free_page((unsigned long)path_name);
|
||||
if (err > 0)
|
||||
return 0;
|
||||
if (err < 0)
|
||||
if (err < 0 && err != -ENOSYS)
|
||||
return err;
|
||||
|
||||
if (err == -ENOSYS)
|
||||
fm->fc->no_dentry_canonical_path = 1;
|
||||
|
||||
out:
|
||||
canonical_path->dentry = path->dentry;
|
||||
canonical_path->mnt = path->mnt;
|
||||
path_get(canonical_path);
|
||||
|
@ -797,6 +797,9 @@ struct fuse_conn {
|
||||
/** Is bmap not implemented by fs? */
|
||||
unsigned no_bmap:1;
|
||||
|
||||
/** Is dentry_canonical_path not implemented by fs? */
|
||||
unsigned no_dentry_canonical_path:1;
|
||||
|
||||
/** Is poll not implemented by fs? */
|
||||
unsigned no_poll:1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user