mirror of https://github.com/OpenIPC/firmware.git
25 lines
904 B
Diff
25 lines
904 B
Diff
diff -drupN a/include/linux/fsnotify.h b/include/linux/fsnotify.h
|
|
--- a/include/linux/fsnotify.h 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/include/linux/fsnotify.h 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -213,12 +213,20 @@ static inline void fsnotify_modify(struc
|
|
static inline void fsnotify_open(struct file *file)
|
|
{
|
|
struct path *path = &file->f_path;
|
|
+ struct path lower_path;
|
|
struct inode *inode = path->dentry->d_inode;
|
|
+
|
|
__u32 mask = FS_OPEN;
|
|
|
|
if (S_ISDIR(inode->i_mode))
|
|
mask |= FS_ISDIR;
|
|
|
|
+ if (path->dentry->d_op && path->dentry->d_op->d_canonical_path) {
|
|
+ path->dentry->d_op->d_canonical_path(path, &lower_path);
|
|
+ fsnotify_parent(&lower_path, NULL, mask);
|
|
+ fsnotify(lower_path.dentry->d_inode, mask, &lower_path, FSNOTIFY_EVENT_PATH, NULL, 0);
|
|
+ path_put(&lower_path);
|
|
+ }
|
|
fsnotify_parent(path, NULL, mask);
|
|
fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0);
|
|
}
|