aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r--include/linux/fsnotify_backend.h31
1 files changed, 9 insertions, 22 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index ca060d7c4fa6..0f313f93c586 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -197,24 +197,6 @@ struct fsnotify_group {
197#define FSNOTIFY_EVENT_INODE 2 197#define FSNOTIFY_EVENT_INODE 2
198 198
199/* 199/*
200 * Inode specific fields in an fsnotify_mark
201 */
202struct fsnotify_inode_mark {
203 struct inode *inode; /* inode this mark is associated with */
204 struct hlist_node i_list; /* list of marks by inode->i_fsnotify_marks */
205 struct list_head free_i_list; /* tmp list used when freeing this mark */
206};
207
208/*
209 * Mount point specific fields in an fsnotify_mark
210 */
211struct fsnotify_vfsmount_mark {
212 struct vfsmount *mnt; /* vfsmount this mark is associated with */
213 struct hlist_node m_list; /* list of marks by inode->i_fsnotify_marks */
214 struct list_head free_m_list; /* tmp list used when freeing this mark */
215};
216
217/*
218 * a mark is simply an object attached to an in core inode which allows an 200 * a mark is simply an object attached to an in core inode which allows an
219 * fsnotify listener to indicate they are either no longer interested in events 201 * fsnotify listener to indicate they are either no longer interested in events
220 * of a type matching mask or only interested in those events. 202 * of a type matching mask or only interested in those events.
@@ -230,11 +212,17 @@ struct fsnotify_mark {
230 * in kernel that found and may be using this mark. */ 212 * in kernel that found and may be using this mark. */
231 atomic_t refcnt; /* active things looking at this mark */ 213 atomic_t refcnt; /* active things looking at this mark */
232 struct fsnotify_group *group; /* group this mark is for */ 214 struct fsnotify_group *group; /* group this mark is for */
233 struct list_head g_list; /* list of marks by group->i_fsnotify_marks */ 215 struct list_head g_list; /* list of marks by group->i_fsnotify_marks
216 * Also reused for queueing mark into
217 * destroy_list when it's waiting for
218 * the end of SRCU period before it can
219 * be freed */
234 spinlock_t lock; /* protect group and inode */ 220 spinlock_t lock; /* protect group and inode */
221 struct hlist_node obj_list; /* list of marks for inode / vfsmount */
222 struct list_head free_list; /* tmp list used when freeing this mark */
235 union { 223 union {
236 struct fsnotify_inode_mark i; 224 struct inode *inode; /* inode this mark is associated with */
237 struct fsnotify_vfsmount_mark m; 225 struct vfsmount *mnt; /* vfsmount this mark is associated with */
238 }; 226 };
239 __u32 ignored_mask; /* events types to ignore */ 227 __u32 ignored_mask; /* events types to ignore */
240#define FSNOTIFY_MARK_FLAG_INODE 0x01 228#define FSNOTIFY_MARK_FLAG_INODE 0x01
@@ -243,7 +231,6 @@ struct fsnotify_mark {
243#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x08 231#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x08
244#define FSNOTIFY_MARK_FLAG_ALIVE 0x10 232#define FSNOTIFY_MARK_FLAG_ALIVE 0x10
245 unsigned int flags; /* vfsmount or inode mark? */ 233 unsigned int flags; /* vfsmount or inode mark? */
246 struct list_head destroy_list;
247 void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */ 234 void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */
248}; 235};
249 236