mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
ANDROID: fsnotify: Do not notify lower fs of open when ENOSYS
Even though FUSE supports d_canonical_path, the underlying server may not implement the operation. In that case, follow the same logic for filesystems that do not have the canonical path operation instead of returning early from fsnotify_file with an error. Bug: 326995824 Test: cts-tradefed run commandAndExit cts -m CtsOsTestCases -t android.os.cts.FileObserverTest Change-Id: Iae618d4159222b06467b9a0bbb67fb67885aa65e Signed-off-by: Tiffany Yang <ynaffit@google.com> (cherry picked from commit 61d32e739d27dd35353a22804023f099b383df3b)
This commit is contained in:
committed by
Alistair Delva
parent
7d0a1d6b86
commit
a112c9c24c
@@ -107,15 +107,17 @@ static inline int fsnotify_file(struct file *file, __u32 mask)
|
||||
|
||||
ret = path->dentry->d_op->d_canonical_path(path,
|
||||
&lower_path);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret != -ENOSYS) {
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = fsnotify_parent(lower_path.dentry, mask,
|
||||
&lower_path, FSNOTIFY_EVENT_PATH);
|
||||
path_put(&lower_path);
|
||||
ret = fsnotify_parent(lower_path.dentry, mask,
|
||||
&lower_path, FSNOTIFY_EVENT_PATH);
|
||||
path_put(&lower_path);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user