forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/fs/notify/inotify/inotify.h
....@@ -5,6 +5,7 @@
55
66 struct inotify_event_info {
77 struct fsnotify_event fse;
8
+ u32 mask;
89 int wd;
910 u32 sync_cookie;
1011 int name_len;
....@@ -21,13 +22,24 @@
2122 return container_of(fse, struct inotify_event_info, fse);
2223 }
2324
25
+/*
26
+ * INOTIFY_USER_FLAGS represents all of the mask bits that we expose to
27
+ * userspace. There is at least one bit (FS_EVENT_ON_CHILD) which is
28
+ * used only internally to the kernel.
29
+ */
30
+#define INOTIFY_USER_MASK (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK)
31
+
32
+static inline __u32 inotify_mark_user_mask(struct fsnotify_mark *fsn_mark)
33
+{
34
+ return fsn_mark->mask & INOTIFY_USER_MASK;
35
+}
36
+
2437 extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
2538 struct fsnotify_group *group);
26
-extern int inotify_handle_event(struct fsnotify_group *group,
27
- struct inode *inode,
28
- u32 mask, const void *data, int data_type,
29
- const unsigned char *file_name, u32 cookie,
30
- struct fsnotify_iter_info *iter_info);
39
+extern int inotify_handle_inode_event(struct fsnotify_mark *inode_mark,
40
+ u32 mask, struct inode *inode,
41
+ struct inode *dir,
42
+ const struct qstr *name, u32 cookie);
3143
3244 extern const struct fsnotify_ops inotify_fsnotify_ops;
3345 extern struct kmem_cache *inotify_inode_mark_cachep;