aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:23 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:52 -0400
commit2823e04de4f1a49087b58ff2bb8f61361ffd9321 (patch)
tree0467ddf513cfb9ec76f3fe498bdc9b5084008c84 /include/linux/fsnotify_backend.h
parent3a9fb89f4cd04c23e16397befba92efb5d989b74 (diff)
fsnotify: put inode specific fields in an fsnotify_mark in a union
The addition of marks on vfs mounts will be simplified if the inode specific parts of a mark and the vfsmnt specific parts of a mark are actually in a union so naming can be easy. This patch just implements the inode struct and the union. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r--include/linux/fsnotify_backend.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index c2a04b7e4fca..dca7f2cbde90 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -227,6 +227,15 @@ struct fsnotify_event {
227}; 227};
228 228
229/* 229/*
230 * Inode specific fields in an fsnotify_mark_entry
231 */
232struct fsnotify_inode_mark {
233 struct inode *inode; /* inode this entry is associated with */
234 struct hlist_node i_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */
235 struct list_head free_i_list; /* tmp list used when freeing this mark */
236};
237
238/*
230 * a mark is simply an entry attached to an in core inode which allows an 239 * a mark is simply an entry attached to an in core inode which allows an
231 * fsnotify listener to indicate they are either no longer interested in events 240 * fsnotify listener to indicate they are either no longer interested in events
232 * of a type matching mask or only interested in those events. 241 * of a type matching mask or only interested in those events.
@@ -241,12 +250,12 @@ struct fsnotify_mark_entry {
241 /* we hold ref for each i_list and g_list. also one ref for each 'thing' 250 /* we hold ref for each i_list and g_list. also one ref for each 'thing'
242 * in kernel that found and may be using this mark. */ 251 * in kernel that found and may be using this mark. */
243 atomic_t refcnt; /* active things looking at this mark */ 252 atomic_t refcnt; /* active things looking at this mark */
244 struct inode *inode; /* inode this entry is associated with */
245 struct fsnotify_group *group; /* group this mark entry is for */ 253 struct fsnotify_group *group; /* group this mark entry is for */
246 struct hlist_node i_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */
247 struct list_head g_list; /* list of mark_entries by group->i_fsnotify_mark_entries */ 254 struct list_head g_list; /* list of mark_entries by group->i_fsnotify_mark_entries */
248 spinlock_t lock; /* protect group, inode, and killme */ 255 spinlock_t lock; /* protect group and inode */
249 struct list_head free_i_list; /* tmp list used when freeing this mark */ 256 union {
257 struct fsnotify_inode_mark i;
258 };
250 struct list_head free_g_list; /* tmp list used when freeing this mark */ 259 struct list_head free_g_list; /* tmp list used when freeing this mark */
251 void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */ 260 void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */
252}; 261};