diff options
author | Jan Kara <jack@suse.cz> | 2014-12-12 19:58:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 15:42:53 -0500 |
commit | 0809ab69a2782afac8c4d7f3d35cd123050aab9a (patch) | |
tree | 373ed29c67e9ffd46a53d04e6fc68f4d96b6ba2d /include/linux/fsnotify_backend.h | |
parent | 820c12d5d6c0890bc93dd63893924a13041fdc35 (diff) |
fsnotify: unify inode and mount marks handling
There's a lot of common code in inode and mount marks handling. Factor it
out to a common helper function.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r-- | include/linux/fsnotify_backend.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index ca060d7c4fa6..442847a02b8f 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 | */ | ||
202 | struct 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 | */ | ||
211 | struct 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. |
@@ -232,9 +214,11 @@ struct fsnotify_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 */ |
234 | spinlock_t lock; /* protect group and inode */ | 216 | spinlock_t lock; /* protect group and inode */ |
217 | struct hlist_node obj_list; /* list of marks for inode / vfsmount */ | ||
218 | struct list_head free_list; /* tmp list used when freeing this mark */ | ||
235 | union { | 219 | union { |
236 | struct fsnotify_inode_mark i; | 220 | struct inode *inode; /* inode this mark is associated with */ |
237 | struct fsnotify_vfsmount_mark m; | 221 | struct vfsmount *mnt; /* vfsmount this mark is associated with */ |
238 | }; | 222 | }; |
239 | __u32 ignored_mask; /* events types to ignore */ | 223 | __u32 ignored_mask; /* events types to ignore */ |
240 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 | 224 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 |