diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:23 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:52 -0400 |
commit | 2823e04de4f1a49087b58ff2bb8f61361ffd9321 (patch) | |
tree | 0467ddf513cfb9ec76f3fe498bdc9b5084008c84 /include/linux | |
parent | 3a9fb89f4cd04c23e16397befba92efb5d989b74 (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')
-rw-r--r-- | include/linux/fsnotify_backend.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index c2a04b7e4fc..dca7f2cbde9 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -227,6 +227,15 @@ struct fsnotify_event { }; /* + * Inode specific fields in an fsnotify_mark_entry + */ +struct fsnotify_inode_mark { + struct inode *inode; /* inode this entry is associated with */ + struct hlist_node i_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */ + struct list_head free_i_list; /* tmp list used when freeing this mark */ +}; + +/* * a mark is simply an entry attached to an in core inode which allows an * fsnotify listener to indicate they are either no longer interested in events * of a type matching mask or only interested in those events. @@ -241,12 +250,12 @@ struct fsnotify_mark_entry { /* we hold ref for each i_list and g_list. also one ref for each 'thing' * in kernel that found and may be using this mark. */ atomic_t refcnt; /* active things looking at this mark */ - struct inode *inode; /* inode this entry is associated with */ struct fsnotify_group *group; /* group this mark entry is for */ - struct hlist_node i_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */ struct list_head g_list; /* list of mark_entries by group->i_fsnotify_mark_entries */ - spinlock_t lock; /* protect group, inode, and killme */ - struct list_head free_i_list; /* tmp list used when freeing this mark */ + spinlock_t lock; /* protect group and inode */ + union { + struct fsnotify_inode_mark i; + }; struct list_head free_g_list; /* tmp list used when freeing this mark */ void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */ }; |