diff options
-rw-r--r-- | fs/inode.c | 2 | ||||
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 24 | ||||
-rw-r--r-- | fs/notify/group.c | 8 | ||||
-rw-r--r-- | fs/notify/inode_mark.c | 48 | ||||
-rw-r--r-- | fs/notify/inotify/inotify.h | 6 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 8 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 8 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/fsnotify.h | 18 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 38 | ||||
-rw-r--r-- | kernel/audit_tree.c | 14 | ||||
-rw-r--r-- | kernel/audit_watch.c | 8 | ||||
-rw-r--r-- | kernel/auditsc.c | 4 |
13 files changed, 94 insertions, 94 deletions
diff --git a/fs/inode.c b/fs/inode.c index 8e1bee998796..a2da778467bb 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -264,7 +264,7 @@ void inode_init_once(struct inode *inode) | |||
264 | INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear); | 264 | INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear); |
265 | i_size_ordered_init(inode); | 265 | i_size_ordered_init(inode); |
266 | #ifdef CONFIG_FSNOTIFY | 266 | #ifdef CONFIG_FSNOTIFY |
267 | INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries); | 267 | INIT_HLIST_HEAD(&inode->i_fsnotify_marks); |
268 | #endif | 268 | #endif |
269 | } | 269 | } |
270 | EXPORT_SYMBOL(inode_init_once); | 270 | EXPORT_SYMBOL(inode_init_once); |
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index fc3a9dc567c5..e6edae60894d 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -34,12 +34,12 @@ static struct fsnotify_group *dnotify_group __read_mostly; | |||
34 | static DEFINE_MUTEX(dnotify_mark_mutex); | 34 | static DEFINE_MUTEX(dnotify_mark_mutex); |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * dnotify will attach one of these to each inode (i_fsnotify_mark_entries) which | 37 | * dnotify will attach one of these to each inode (i_fsnotify_marks) which |
38 | * is being watched by dnotify. If multiple userspace applications are watching | 38 | * is being watched by dnotify. If multiple userspace applications are watching |
39 | * the same directory with dnotify their information is chained in dn | 39 | * the same directory with dnotify their information is chained in dn |
40 | */ | 40 | */ |
41 | struct dnotify_mark_entry { | 41 | struct dnotify_mark_entry { |
42 | struct fsnotify_mark_entry fsn_entry; | 42 | struct fsnotify_mark fsn_entry; |
43 | struct dnotify_struct *dn; | 43 | struct dnotify_struct *dn; |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -51,7 +51,7 @@ struct dnotify_mark_entry { | |||
51 | * it calls the fsnotify function so it can update the set of all events relevant | 51 | * it calls the fsnotify function so it can update the set of all events relevant |
52 | * to this inode. | 52 | * to this inode. |
53 | */ | 53 | */ |
54 | static void dnotify_recalc_inode_mask(struct fsnotify_mark_entry *entry) | 54 | static void dnotify_recalc_inode_mask(struct fsnotify_mark *entry) |
55 | { | 55 | { |
56 | __u32 new_mask, old_mask; | 56 | __u32 new_mask, old_mask; |
57 | struct dnotify_struct *dn; | 57 | struct dnotify_struct *dn; |
@@ -85,7 +85,7 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark_entry *entry) | |||
85 | static int dnotify_handle_event(struct fsnotify_group *group, | 85 | static int dnotify_handle_event(struct fsnotify_group *group, |
86 | struct fsnotify_event *event) | 86 | struct fsnotify_event *event) |
87 | { | 87 | { |
88 | struct fsnotify_mark_entry *entry = NULL; | 88 | struct fsnotify_mark *entry = NULL; |
89 | struct dnotify_mark_entry *dnentry; | 89 | struct dnotify_mark_entry *dnentry; |
90 | struct inode *to_tell; | 90 | struct inode *to_tell; |
91 | struct dnotify_struct *dn; | 91 | struct dnotify_struct *dn; |
@@ -136,7 +136,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
136 | struct inode *inode, struct vfsmount *mnt, | 136 | struct inode *inode, struct vfsmount *mnt, |
137 | __u32 mask, void *data, int data_type) | 137 | __u32 mask, void *data, int data_type) |
138 | { | 138 | { |
139 | struct fsnotify_mark_entry *entry; | 139 | struct fsnotify_mark *entry; |
140 | bool send; | 140 | bool send; |
141 | 141 | ||
142 | /* !dir_notify_enable should never get here, don't waste time checking | 142 | /* !dir_notify_enable should never get here, don't waste time checking |
@@ -163,7 +163,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
163 | return send; | 163 | return send; |
164 | } | 164 | } |
165 | 165 | ||
166 | static void dnotify_free_mark(struct fsnotify_mark_entry *entry) | 166 | static void dnotify_free_mark(struct fsnotify_mark *entry) |
167 | { | 167 | { |
168 | struct dnotify_mark_entry *dnentry = container_of(entry, | 168 | struct dnotify_mark_entry *dnentry = container_of(entry, |
169 | struct dnotify_mark_entry, | 169 | struct dnotify_mark_entry, |
@@ -184,14 +184,14 @@ static struct fsnotify_ops dnotify_fsnotify_ops = { | |||
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Called every time a file is closed. Looks first for a dnotify mark on the | 186 | * Called every time a file is closed. Looks first for a dnotify mark on the |
187 | * inode. If one is found run all of the ->dn entries attached to that | 187 | * inode. If one is found run all of the ->dn structures attached to that |
188 | * mark for one relevant to this process closing the file and remove that | 188 | * mark for one relevant to this process closing the file and remove that |
189 | * dnotify_struct. If that was the last dnotify_struct also remove the | 189 | * dnotify_struct. If that was the last dnotify_struct also remove the |
190 | * fsnotify_mark_entry. | 190 | * fsnotify_mark. |
191 | */ | 191 | */ |
192 | void dnotify_flush(struct file *filp, fl_owner_t id) | 192 | void dnotify_flush(struct file *filp, fl_owner_t id) |
193 | { | 193 | { |
194 | struct fsnotify_mark_entry *entry; | 194 | struct fsnotify_mark *entry; |
195 | struct dnotify_mark_entry *dnentry; | 195 | struct dnotify_mark_entry *dnentry; |
196 | struct dnotify_struct *dn; | 196 | struct dnotify_struct *dn; |
197 | struct dnotify_struct **prev; | 197 | struct dnotify_struct **prev; |
@@ -260,7 +260,7 @@ static __u32 convert_arg(unsigned long arg) | |||
260 | 260 | ||
261 | /* | 261 | /* |
262 | * If multiple processes watch the same inode with dnotify there is only one | 262 | * If multiple processes watch the same inode with dnotify there is only one |
263 | * dnotify mark in inode->i_fsnotify_mark_entries but we chain a dnotify_struct | 263 | * dnotify mark in inode->i_fsnotify_marks but we chain a dnotify_struct |
264 | * onto that mark. This function either attaches the new dnotify_struct onto | 264 | * onto that mark. This function either attaches the new dnotify_struct onto |
265 | * that list, or it |= the mask onto an existing dnofiy_struct. | 265 | * that list, or it |= the mask onto an existing dnofiy_struct. |
266 | */ | 266 | */ |
@@ -298,7 +298,7 @@ static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark_entry *dnent | |||
298 | int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | 298 | int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) |
299 | { | 299 | { |
300 | struct dnotify_mark_entry *new_dnentry, *dnentry; | 300 | struct dnotify_mark_entry *new_dnentry, *dnentry; |
301 | struct fsnotify_mark_entry *new_entry, *entry; | 301 | struct fsnotify_mark *new_entry, *entry; |
302 | struct dnotify_struct *dn; | 302 | struct dnotify_struct *dn; |
303 | struct inode *inode; | 303 | struct inode *inode; |
304 | fl_owner_t id = current->files; | 304 | fl_owner_t id = current->files; |
@@ -378,7 +378,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | |||
378 | /* if (f != filp) means that we lost a race and another task/thread | 378 | /* if (f != filp) means that we lost a race and another task/thread |
379 | * actually closed the fd we are still playing with before we grabbed | 379 | * actually closed the fd we are still playing with before we grabbed |
380 | * the dnotify_mark_mutex and entry->lock. Since closing the fd is the | 380 | * the dnotify_mark_mutex and entry->lock. Since closing the fd is the |
381 | * only time we clean up the mark entries we need to get our mark off | 381 | * only time we clean up the marks we need to get our mark off |
382 | * the list. */ | 382 | * the list. */ |
383 | if (f != filp) { | 383 | if (f != filp) { |
384 | /* if we added ourselves, shoot ourselves, it's possible that | 384 | /* if we added ourselves, shoot ourselves, it's possible that |
diff --git a/fs/notify/group.c b/fs/notify/group.c index aa4654fe6ec2..b70e7d21dfde 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c | |||
@@ -74,10 +74,10 @@ void fsnotify_recalc_group_mask(struct fsnotify_group *group) | |||
74 | { | 74 | { |
75 | __u32 mask = 0; | 75 | __u32 mask = 0; |
76 | __u32 old_mask = group->mask; | 76 | __u32 old_mask = group->mask; |
77 | struct fsnotify_mark_entry *entry; | 77 | struct fsnotify_mark *entry; |
78 | 78 | ||
79 | spin_lock(&group->mark_lock); | 79 | spin_lock(&group->mark_lock); |
80 | list_for_each_entry(entry, &group->mark_entries, g_list) | 80 | list_for_each_entry(entry, &group->marks_list, g_list) |
81 | mask |= entry->mask; | 81 | mask |= entry->mask; |
82 | spin_unlock(&group->mark_lock); | 82 | spin_unlock(&group->mark_lock); |
83 | 83 | ||
@@ -133,7 +133,7 @@ void fsnotify_final_destroy_group(struct fsnotify_group *group) | |||
133 | */ | 133 | */ |
134 | static void fsnotify_destroy_group(struct fsnotify_group *group) | 134 | static void fsnotify_destroy_group(struct fsnotify_group *group) |
135 | { | 135 | { |
136 | /* clear all inode mark entries for this group */ | 136 | /* clear all inode marks for this group */ |
137 | fsnotify_clear_marks_by_group(group); | 137 | fsnotify_clear_marks_by_group(group); |
138 | 138 | ||
139 | /* past the point of no return, matches the initial value of 1 */ | 139 | /* past the point of no return, matches the initial value of 1 */ |
@@ -224,7 +224,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) | |||
224 | INIT_LIST_HEAD(&group->vfsmount_group_list); | 224 | INIT_LIST_HEAD(&group->vfsmount_group_list); |
225 | 225 | ||
226 | spin_lock_init(&group->mark_lock); | 226 | spin_lock_init(&group->mark_lock); |
227 | INIT_LIST_HEAD(&group->mark_entries); | 227 | INIT_LIST_HEAD(&group->marks_list); |
228 | 228 | ||
229 | group->ops = ops; | 229 | group->ops = ops; |
230 | 230 | ||
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index b00065842b3e..7e69f6b08d4e 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -38,12 +38,12 @@ | |||
38 | * that lock to dereference either of these things (they could be NULL even with | 38 | * that lock to dereference either of these things (they could be NULL even with |
39 | * the lock) | 39 | * the lock) |
40 | * | 40 | * |
41 | * group->mark_lock protects the mark_entries list anchored inside a given group | 41 | * group->mark_lock protects the marks_list anchored inside a given group |
42 | * and each entry is hooked via the g_list. It also sorta protects the | 42 | * and each entry is hooked via the g_list. It also sorta protects the |
43 | * free_g_list, which when used is anchored by a private list on the stack of the | 43 | * free_g_list, which when used is anchored by a private list on the stack of the |
44 | * task which held the group->mark_lock. | 44 | * task which held the group->mark_lock. |
45 | * | 45 | * |
46 | * inode->i_lock protects the i_fsnotify_mark_entries list anchored inside a | 46 | * inode->i_lock protects the i_fsnotify_marks list anchored inside a |
47 | * given inode and each entry is hooked via the i_list. (and sorta the | 47 | * given inode and each entry is hooked via the i_list. (and sorta the |
48 | * free_i_list) | 48 | * free_i_list) |
49 | * | 49 | * |
@@ -61,7 +61,7 @@ | |||
61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) | 61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) |
62 | * | 62 | * |
63 | * Worst case we are given an inode and need to clean up all the marks on that | 63 | * Worst case we are given an inode and need to clean up all the marks on that |
64 | * inode. We take i_lock and walk the i_fsnotify_mark_entries safely. For each | 64 | * inode. We take i_lock and walk the i_fsnotify_marks safely. For each |
65 | * mark on the list we take a reference (so the mark can't disappear under us). | 65 | * mark on the list we take a reference (so the mark can't disappear under us). |
66 | * We remove that mark form the inode's list of marks and we add this mark to a | 66 | * We remove that mark form the inode's list of marks and we add this mark to a |
67 | * private list anchored on the stack using i_free_list; At this point we no | 67 | * private list anchored on the stack using i_free_list; At this point we no |
@@ -95,12 +95,12 @@ | |||
95 | #include <linux/fsnotify_backend.h> | 95 | #include <linux/fsnotify_backend.h> |
96 | #include "fsnotify.h" | 96 | #include "fsnotify.h" |
97 | 97 | ||
98 | void fsnotify_get_mark(struct fsnotify_mark_entry *entry) | 98 | void fsnotify_get_mark(struct fsnotify_mark *entry) |
99 | { | 99 | { |
100 | atomic_inc(&entry->refcnt); | 100 | atomic_inc(&entry->refcnt); |
101 | } | 101 | } |
102 | 102 | ||
103 | void fsnotify_put_mark(struct fsnotify_mark_entry *entry) | 103 | void fsnotify_put_mark(struct fsnotify_mark *entry) |
104 | { | 104 | { |
105 | if (atomic_dec_and_test(&entry->refcnt)) | 105 | if (atomic_dec_and_test(&entry->refcnt)) |
106 | entry->free_mark(entry); | 106 | entry->free_mark(entry); |
@@ -111,13 +111,13 @@ void fsnotify_put_mark(struct fsnotify_mark_entry *entry) | |||
111 | */ | 111 | */ |
112 | static void fsnotify_recalc_inode_mask_locked(struct inode *inode) | 112 | static void fsnotify_recalc_inode_mask_locked(struct inode *inode) |
113 | { | 113 | { |
114 | struct fsnotify_mark_entry *entry; | 114 | struct fsnotify_mark *entry; |
115 | struct hlist_node *pos; | 115 | struct hlist_node *pos; |
116 | __u32 new_mask = 0; | 116 | __u32 new_mask = 0; |
117 | 117 | ||
118 | assert_spin_locked(&inode->i_lock); | 118 | assert_spin_locked(&inode->i_lock); |
119 | 119 | ||
120 | hlist_for_each_entry(entry, pos, &inode->i_fsnotify_mark_entries, i.i_list) | 120 | hlist_for_each_entry(entry, pos, &inode->i_fsnotify_marks, i.i_list) |
121 | new_mask |= entry->mask; | 121 | new_mask |= entry->mask; |
122 | inode->i_fsnotify_mask = new_mask; | 122 | inode->i_fsnotify_mask = new_mask; |
123 | } | 123 | } |
@@ -140,7 +140,7 @@ void fsnotify_recalc_inode_mask(struct inode *inode) | |||
140 | * The caller had better be holding a reference to this mark so we don't actually | 140 | * The caller had better be holding a reference to this mark so we don't actually |
141 | * do the final put under the entry->lock | 141 | * do the final put under the entry->lock |
142 | */ | 142 | */ |
143 | void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | 143 | void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry) |
144 | { | 144 | { |
145 | struct fsnotify_group *group; | 145 | struct fsnotify_group *group; |
146 | struct inode *inode; | 146 | struct inode *inode; |
@@ -174,7 +174,7 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | |||
174 | fsnotify_put_mark(entry); /* for i_list and g_list */ | 174 | fsnotify_put_mark(entry); /* for i_list and g_list */ |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * this mark is now off the inode->i_fsnotify_mark_entries list and we | 177 | * this mark is now off the inode->i_fsnotify_marks list and we |
178 | * hold the inode->i_lock, so this is the perfect time to update the | 178 | * hold the inode->i_lock, so this is the perfect time to update the |
179 | * inode->i_fsnotify_mask | 179 | * inode->i_fsnotify_mask |
180 | */ | 180 | */ |
@@ -221,11 +221,11 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | |||
221 | */ | 221 | */ |
222 | void fsnotify_clear_marks_by_group(struct fsnotify_group *group) | 222 | void fsnotify_clear_marks_by_group(struct fsnotify_group *group) |
223 | { | 223 | { |
224 | struct fsnotify_mark_entry *lentry, *entry; | 224 | struct fsnotify_mark *lentry, *entry; |
225 | LIST_HEAD(free_list); | 225 | LIST_HEAD(free_list); |
226 | 226 | ||
227 | spin_lock(&group->mark_lock); | 227 | spin_lock(&group->mark_lock); |
228 | list_for_each_entry_safe(entry, lentry, &group->mark_entries, g_list) { | 228 | list_for_each_entry_safe(entry, lentry, &group->marks_list, g_list) { |
229 | list_add(&entry->free_g_list, &free_list); | 229 | list_add(&entry->free_g_list, &free_list); |
230 | list_del_init(&entry->g_list); | 230 | list_del_init(&entry->g_list); |
231 | fsnotify_get_mark(entry); | 231 | fsnotify_get_mark(entry); |
@@ -243,12 +243,12 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group) | |||
243 | */ | 243 | */ |
244 | void fsnotify_clear_marks_by_inode(struct inode *inode) | 244 | void fsnotify_clear_marks_by_inode(struct inode *inode) |
245 | { | 245 | { |
246 | struct fsnotify_mark_entry *entry, *lentry; | 246 | struct fsnotify_mark *entry, *lentry; |
247 | struct hlist_node *pos, *n; | 247 | struct hlist_node *pos, *n; |
248 | LIST_HEAD(free_list); | 248 | LIST_HEAD(free_list); |
249 | 249 | ||
250 | spin_lock(&inode->i_lock); | 250 | spin_lock(&inode->i_lock); |
251 | hlist_for_each_entry_safe(entry, pos, n, &inode->i_fsnotify_mark_entries, i.i_list) { | 251 | hlist_for_each_entry_safe(entry, pos, n, &inode->i_fsnotify_marks, i.i_list) { |
252 | list_add(&entry->i.free_i_list, &free_list); | 252 | list_add(&entry->i.free_i_list, &free_list); |
253 | hlist_del_init(&entry->i.i_list); | 253 | hlist_del_init(&entry->i.i_list); |
254 | fsnotify_get_mark(entry); | 254 | fsnotify_get_mark(entry); |
@@ -265,15 +265,15 @@ void fsnotify_clear_marks_by_inode(struct inode *inode) | |||
265 | * given a group and inode, find the mark associated with that combination. | 265 | * given a group and inode, find the mark associated with that combination. |
266 | * if found take a reference to that mark and return it, else return NULL | 266 | * if found take a reference to that mark and return it, else return NULL |
267 | */ | 267 | */ |
268 | struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *group, | 268 | struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, |
269 | struct inode *inode) | 269 | struct inode *inode) |
270 | { | 270 | { |
271 | struct fsnotify_mark_entry *entry; | 271 | struct fsnotify_mark *entry; |
272 | struct hlist_node *pos; | 272 | struct hlist_node *pos; |
273 | 273 | ||
274 | assert_spin_locked(&inode->i_lock); | 274 | assert_spin_locked(&inode->i_lock); |
275 | 275 | ||
276 | hlist_for_each_entry(entry, pos, &inode->i_fsnotify_mark_entries, i.i_list) { | 276 | hlist_for_each_entry(entry, pos, &inode->i_fsnotify_marks, i.i_list) { |
277 | if (entry->group == group) { | 277 | if (entry->group == group) { |
278 | fsnotify_get_mark(entry); | 278 | fsnotify_get_mark(entry); |
279 | return entry; | 279 | return entry; |
@@ -282,7 +282,7 @@ struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *grou | |||
282 | return NULL; | 282 | return NULL; |
283 | } | 283 | } |
284 | 284 | ||
285 | void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_mark_entry *old) | 285 | void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *old) |
286 | { | 286 | { |
287 | assert_spin_locked(&old->lock); | 287 | assert_spin_locked(&old->lock); |
288 | new->i.inode = old->i.inode; | 288 | new->i.inode = old->i.inode; |
@@ -294,8 +294,8 @@ void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_ma | |||
294 | /* | 294 | /* |
295 | * Nothing fancy, just initialize lists and locks and counters. | 295 | * Nothing fancy, just initialize lists and locks and counters. |
296 | */ | 296 | */ |
297 | void fsnotify_init_mark(struct fsnotify_mark_entry *entry, | 297 | void fsnotify_init_mark(struct fsnotify_mark *entry, |
298 | void (*free_mark)(struct fsnotify_mark_entry *entry)) | 298 | void (*free_mark)(struct fsnotify_mark *entry)) |
299 | { | 299 | { |
300 | spin_lock_init(&entry->lock); | 300 | spin_lock_init(&entry->lock); |
301 | atomic_set(&entry->refcnt, 1); | 301 | atomic_set(&entry->refcnt, 1); |
@@ -311,11 +311,11 @@ void fsnotify_init_mark(struct fsnotify_mark_entry *entry, | |||
311 | * These marks may be used for the fsnotify backend to determine which | 311 | * These marks may be used for the fsnotify backend to determine which |
312 | * event types should be delivered to which group and for which inodes. | 312 | * event types should be delivered to which group and for which inodes. |
313 | */ | 313 | */ |
314 | int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | 314 | int fsnotify_add_mark(struct fsnotify_mark *entry, |
315 | struct fsnotify_group *group, struct inode *inode, | 315 | struct fsnotify_group *group, struct inode *inode, |
316 | int allow_dups) | 316 | int allow_dups) |
317 | { | 317 | { |
318 | struct fsnotify_mark_entry *lentry = NULL; | 318 | struct fsnotify_mark *lentry = NULL; |
319 | int ret = 0; | 319 | int ret = 0; |
320 | 320 | ||
321 | inode = igrab(inode); | 321 | inode = igrab(inode); |
@@ -354,8 +354,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
354 | entry->group = group; | 354 | entry->group = group; |
355 | entry->i.inode = inode; | 355 | entry->i.inode = inode; |
356 | 356 | ||
357 | hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_mark_entries); | 357 | hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_marks); |
358 | list_add(&entry->g_list, &group->mark_entries); | 358 | list_add(&entry->g_list, &group->marks_list); |
359 | 359 | ||
360 | fsnotify_get_mark(entry); /* for i_list and g_list */ | 360 | fsnotify_get_mark(entry); /* for i_list and g_list */ |
361 | 361 | ||
diff --git a/fs/notify/inotify/inotify.h b/fs/notify/inotify/inotify.h index f234f3a4c8ca..07be6df2428f 100644 --- a/fs/notify/inotify/inotify.h +++ b/fs/notify/inotify/inotify.h | |||
@@ -10,12 +10,12 @@ struct inotify_event_private_data { | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | struct inotify_inode_mark_entry { | 12 | struct inotify_inode_mark_entry { |
13 | /* fsnotify_mark_entry MUST be the first thing */ | 13 | /* fsnotify_mark MUST be the first thing */ |
14 | struct fsnotify_mark_entry fsn_entry; | 14 | struct fsnotify_mark fsn_entry; |
15 | int wd; | 15 | int wd; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | extern void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry, | 18 | extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *entry, |
19 | struct fsnotify_group *group); | 19 | struct fsnotify_group *group); |
20 | extern void inotify_free_event_priv(struct fsnotify_event_private_data *event_priv); | 20 | extern void inotify_free_event_priv(struct fsnotify_event_private_data *event_priv); |
21 | 21 | ||
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 3edb51cfcfbe..f33a9bd32e5d 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -88,7 +88,7 @@ static int inotify_merge(struct list_head *list, struct fsnotify_event *event) | |||
88 | 88 | ||
89 | static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_event *event) | 89 | static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_event *event) |
90 | { | 90 | { |
91 | struct fsnotify_mark_entry *entry; | 91 | struct fsnotify_mark *entry; |
92 | struct inotify_inode_mark_entry *ientry; | 92 | struct inotify_inode_mark_entry *ientry; |
93 | struct inode *to_tell; | 93 | struct inode *to_tell; |
94 | struct inotify_event_private_data *event_priv; | 94 | struct inotify_event_private_data *event_priv; |
@@ -135,7 +135,7 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev | |||
135 | return ret; | 135 | return ret; |
136 | } | 136 | } |
137 | 137 | ||
138 | static void inotify_freeing_mark(struct fsnotify_mark_entry *entry, struct fsnotify_group *group) | 138 | static void inotify_freeing_mark(struct fsnotify_mark *entry, struct fsnotify_group *group) |
139 | { | 139 | { |
140 | inotify_ignored_and_remove_idr(entry, group); | 140 | inotify_ignored_and_remove_idr(entry, group); |
141 | } | 141 | } |
@@ -144,7 +144,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode | |||
144 | struct vfsmount *mnt, __u32 mask, void *data, | 144 | struct vfsmount *mnt, __u32 mask, void *data, |
145 | int data_type) | 145 | int data_type) |
146 | { | 146 | { |
147 | struct fsnotify_mark_entry *entry; | 147 | struct fsnotify_mark *entry; |
148 | bool send; | 148 | bool send; |
149 | 149 | ||
150 | spin_lock(&inode->i_lock); | 150 | spin_lock(&inode->i_lock); |
@@ -171,7 +171,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode | |||
171 | */ | 171 | */ |
172 | static int idr_callback(int id, void *p, void *data) | 172 | static int idr_callback(int id, void *p, void *data) |
173 | { | 173 | { |
174 | struct fsnotify_mark_entry *entry; | 174 | struct fsnotify_mark *entry; |
175 | struct inotify_inode_mark_entry *ientry; | 175 | struct inotify_inode_mark_entry *ientry; |
176 | static bool warned = false; | 176 | static bool warned = false; |
177 | 177 | ||
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 4b1587f9df3b..7be5dcf07ac7 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -386,7 +386,7 @@ static struct inotify_inode_mark_entry *inotify_idr_find_locked(struct fsnotify_ | |||
386 | 386 | ||
387 | ientry = idr_find(idr, wd); | 387 | ientry = idr_find(idr, wd); |
388 | if (ientry) { | 388 | if (ientry) { |
389 | struct fsnotify_mark_entry *fsn_entry = &ientry->fsn_entry; | 389 | struct fsnotify_mark *fsn_entry = &ientry->fsn_entry; |
390 | 390 | ||
391 | fsnotify_get_mark(fsn_entry); | 391 | fsnotify_get_mark(fsn_entry); |
392 | /* One ref for being in the idr, one ref we just took */ | 392 | /* One ref for being in the idr, one ref we just took */ |
@@ -499,7 +499,7 @@ out: | |||
499 | /* | 499 | /* |
500 | * Send IN_IGNORED for this wd, remove this wd from the idr. | 500 | * Send IN_IGNORED for this wd, remove this wd from the idr. |
501 | */ | 501 | */ |
502 | void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry, | 502 | void inotify_ignored_and_remove_idr(struct fsnotify_mark *entry, |
503 | struct fsnotify_group *group) | 503 | struct fsnotify_group *group) |
504 | { | 504 | { |
505 | struct inotify_inode_mark_entry *ientry; | 505 | struct inotify_inode_mark_entry *ientry; |
@@ -541,7 +541,7 @@ skip_send_ignore: | |||
541 | } | 541 | } |
542 | 542 | ||
543 | /* ding dong the mark is dead */ | 543 | /* ding dong the mark is dead */ |
544 | static void inotify_free_mark(struct fsnotify_mark_entry *entry) | 544 | static void inotify_free_mark(struct fsnotify_mark *entry) |
545 | { | 545 | { |
546 | struct inotify_inode_mark_entry *ientry; | 546 | struct inotify_inode_mark_entry *ientry; |
547 | 547 | ||
@@ -554,7 +554,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, | |||
554 | struct inode *inode, | 554 | struct inode *inode, |
555 | u32 arg) | 555 | u32 arg) |
556 | { | 556 | { |
557 | struct fsnotify_mark_entry *entry; | 557 | struct fsnotify_mark *entry; |
558 | struct inotify_inode_mark_entry *ientry; | 558 | struct inotify_inode_mark_entry *ientry; |
559 | __u32 old_mask, new_mask; | 559 | __u32 old_mask, new_mask; |
560 | __u32 mask; | 560 | __u32 mask; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index e5598d2f99b9..85fe89c43487 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -768,7 +768,7 @@ struct inode { | |||
768 | 768 | ||
769 | #ifdef CONFIG_FSNOTIFY | 769 | #ifdef CONFIG_FSNOTIFY |
770 | __u32 i_fsnotify_mask; /* all events this inode cares about */ | 770 | __u32 i_fsnotify_mask; /* all events this inode cares about */ |
771 | struct hlist_head i_fsnotify_mark_entries; /* fsnotify mark entries */ | 771 | struct hlist_head i_fsnotify_marks; |
772 | #endif | 772 | #endif |
773 | 773 | ||
774 | unsigned long i_state; | 774 | unsigned long i_state; |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 06d296d85ebf..62e93a9dd115 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -19,10 +19,10 @@ | |||
19 | * fsnotify_d_instantiate - instantiate a dentry for inode | 19 | * fsnotify_d_instantiate - instantiate a dentry for inode |
20 | * Called with dcache_lock held. | 20 | * Called with dcache_lock held. |
21 | */ | 21 | */ |
22 | static inline void fsnotify_d_instantiate(struct dentry *entry, | 22 | static inline void fsnotify_d_instantiate(struct dentry *dentry, |
23 | struct inode *inode) | 23 | struct inode *inode) |
24 | { | 24 | { |
25 | __fsnotify_d_instantiate(entry, inode); | 25 | __fsnotify_d_instantiate(dentry, inode); |
26 | } | 26 | } |
27 | 27 | ||
28 | /* Notify this dentry's parent about a child's events. */ | 28 | /* Notify this dentry's parent about a child's events. */ |
@@ -35,16 +35,16 @@ static inline void fsnotify_parent(struct path *path, struct dentry *dentry, __u | |||
35 | } | 35 | } |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * fsnotify_d_move - entry has been moved | 38 | * fsnotify_d_move - dentry has been moved |
39 | * Called with dcache_lock and entry->d_lock held. | 39 | * Called with dcache_lock and dentry->d_lock held. |
40 | */ | 40 | */ |
41 | static inline void fsnotify_d_move(struct dentry *entry) | 41 | static inline void fsnotify_d_move(struct dentry *dentry) |
42 | { | 42 | { |
43 | /* | 43 | /* |
44 | * On move we need to update entry->d_flags to indicate if the new parent | 44 | * On move we need to update dentry->d_flags to indicate if the new parent |
45 | * cares about events from this entry. | 45 | * cares about events from this dentry. |
46 | */ | 46 | */ |
47 | __fsnotify_update_dcache_flags(entry); | 47 | __fsnotify_update_dcache_flags(dentry); |
48 | } | 48 | } |
49 | 49 | ||
50 | /* | 50 | /* |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 7a6ba755acc3..59c072e8fddd 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -62,7 +62,7 @@ | |||
62 | 62 | ||
63 | struct fsnotify_group; | 63 | struct fsnotify_group; |
64 | struct fsnotify_event; | 64 | struct fsnotify_event; |
65 | struct fsnotify_mark_entry; | 65 | struct fsnotify_mark; |
66 | struct fsnotify_event_private_data; | 66 | struct fsnotify_event_private_data; |
67 | 67 | ||
68 | /* | 68 | /* |
@@ -83,7 +83,7 @@ struct fsnotify_ops { | |||
83 | int data_type); | 83 | int data_type); |
84 | int (*handle_event)(struct fsnotify_group *group, struct fsnotify_event *event); | 84 | int (*handle_event)(struct fsnotify_group *group, struct fsnotify_event *event); |
85 | void (*free_group_priv)(struct fsnotify_group *group); | 85 | void (*free_group_priv)(struct fsnotify_group *group); |
86 | void (*freeing_mark)(struct fsnotify_mark_entry *entry, struct fsnotify_group *group); | 86 | void (*freeing_mark)(struct fsnotify_mark *entry, struct fsnotify_group *group); |
87 | void (*free_event_priv)(struct fsnotify_event_private_data *priv); | 87 | void (*free_event_priv)(struct fsnotify_event_private_data *priv); |
88 | }; | 88 | }; |
89 | 89 | ||
@@ -133,12 +133,12 @@ struct fsnotify_group { | |||
133 | unsigned int q_len; /* events on the queue */ | 133 | unsigned int q_len; /* events on the queue */ |
134 | unsigned int max_events; /* maximum events allowed on the list */ | 134 | unsigned int max_events; /* maximum events allowed on the list */ |
135 | 135 | ||
136 | /* stores all fastapth entries assoc with this group so they can be cleaned on unregister */ | 136 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ |
137 | spinlock_t mark_lock; /* protect mark_entries list */ | 137 | spinlock_t mark_lock; /* protect marks_list */ |
138 | atomic_t num_marks; /* 1 for each mark entry and 1 for not being | 138 | atomic_t num_marks; /* 1 for each mark entry and 1 for not being |
139 | * past the point of no return when freeing | 139 | * past the point of no return when freeing |
140 | * a group */ | 140 | * a group */ |
141 | struct list_head mark_entries; /* all inode mark entries for this group */ | 141 | struct list_head marks_list; /* all inode marks for this group */ |
142 | 142 | ||
143 | /* prevents double list_del of group_list. protected by global fsnotify_grp_mutex */ | 143 | /* prevents double list_del of group_list. protected by global fsnotify_grp_mutex */ |
144 | bool on_inode_group_list; | 144 | bool on_inode_group_list; |
@@ -226,20 +226,20 @@ struct fsnotify_event { | |||
226 | }; | 226 | }; |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * Inode specific fields in an fsnotify_mark_entry | 229 | * Inode specific fields in an fsnotify_mark |
230 | */ | 230 | */ |
231 | struct fsnotify_inode_mark { | 231 | struct fsnotify_inode_mark { |
232 | struct inode *inode; /* inode this entry is associated with */ | 232 | struct inode *inode; /* inode this entry is associated with */ |
233 | struct hlist_node i_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */ | 233 | struct hlist_node i_list; /* list of marks by inode->i_fsnotify_marks */ |
234 | struct list_head free_i_list; /* tmp list used when freeing this mark */ | 234 | struct list_head free_i_list; /* tmp list used when freeing this mark */ |
235 | }; | 235 | }; |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * Mount point specific fields in an fsnotify_mark_entry | 238 | * Mount point specific fields in an fsnotify_mark |
239 | */ | 239 | */ |
240 | struct fsnotify_vfsmount_mark { | 240 | struct fsnotify_vfsmount_mark { |
241 | struct vfsmount *mnt; /* inode this entry is associated with */ | 241 | struct vfsmount *mnt; /* inode this entry is associated with */ |
242 | struct hlist_node m_list; /* list of mark_entries by inode->i_fsnotify_mark_entries */ | 242 | struct hlist_node m_list; /* list of marks by inode->i_fsnotify_marks */ |
243 | struct list_head free_m_list; /* tmp list used when freeing this mark */ | 243 | struct list_head free_m_list; /* tmp list used when freeing this mark */ |
244 | }; | 244 | }; |
245 | 245 | ||
@@ -253,13 +253,13 @@ struct fsnotify_vfsmount_mark { | |||
253 | * (such as dnotify) will flush these when the open fd is closed and not at | 253 | * (such as dnotify) will flush these when the open fd is closed and not at |
254 | * inode eviction or modification. | 254 | * inode eviction or modification. |
255 | */ | 255 | */ |
256 | struct fsnotify_mark_entry { | 256 | struct fsnotify_mark { |
257 | __u32 mask; /* mask this mark entry is for */ | 257 | __u32 mask; /* mask this mark entry is for */ |
258 | /* we hold ref for each i_list and g_list. also one ref for each 'thing' | 258 | /* we hold ref for each i_list and g_list. also one ref for each 'thing' |
259 | * in kernel that found and may be using this mark. */ | 259 | * in kernel that found and may be using this mark. */ |
260 | atomic_t refcnt; /* active things looking at this mark */ | 260 | atomic_t refcnt; /* active things looking at this mark */ |
261 | struct fsnotify_group *group; /* group this mark entry is for */ | 261 | struct fsnotify_group *group; /* group this mark entry is for */ |
262 | struct list_head g_list; /* list of mark_entries by group->i_fsnotify_mark_entries */ | 262 | struct list_head g_list; /* list of marks by group->i_fsnotify_marks */ |
263 | spinlock_t lock; /* protect group and inode */ | 263 | spinlock_t lock; /* protect group and inode */ |
264 | union { | 264 | union { |
265 | struct fsnotify_inode_mark i; | 265 | struct fsnotify_inode_mark i; |
@@ -269,7 +269,7 @@ struct fsnotify_mark_entry { | |||
269 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 | 269 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 |
270 | #define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 | 270 | #define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 |
271 | unsigned int flags; /* vfsmount or inode mark? */ | 271 | unsigned int flags; /* vfsmount or inode mark? */ |
272 | void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */ | 272 | void (*free_mark)(struct fsnotify_mark *entry); /* called on final put+free */ |
273 | }; | 273 | }; |
274 | 274 | ||
275 | #ifdef CONFIG_FSNOTIFY | 275 | #ifdef CONFIG_FSNOTIFY |
@@ -361,19 +361,19 @@ extern struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group | |||
361 | 361 | ||
362 | /* run all marks associated with an inode and update inode->i_fsnotify_mask */ | 362 | /* run all marks associated with an inode and update inode->i_fsnotify_mask */ |
363 | extern void fsnotify_recalc_inode_mask(struct inode *inode); | 363 | extern void fsnotify_recalc_inode_mask(struct inode *inode); |
364 | extern void fsnotify_init_mark(struct fsnotify_mark_entry *entry, void (*free_mark)(struct fsnotify_mark_entry *entry)); | 364 | extern void fsnotify_init_mark(struct fsnotify_mark *entry, void (*free_mark)(struct fsnotify_mark *entry)); |
365 | /* find (and take a reference) to a mark associated with group and inode */ | 365 | /* find (and take a reference) to a mark associated with group and inode */ |
366 | extern struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode); | 366 | extern struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode); |
367 | /* copy the values from old into new */ | 367 | /* copy the values from old into new */ |
368 | extern void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_mark_entry *old); | 368 | extern void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *old); |
369 | /* attach the mark to both the group and the inode */ | 369 | /* attach the mark to both the group and the inode */ |
370 | extern int fsnotify_add_mark(struct fsnotify_mark_entry *entry, struct fsnotify_group *group, struct inode *inode, int allow_dups); | 370 | extern int fsnotify_add_mark(struct fsnotify_mark *entry, struct fsnotify_group *group, struct inode *inode, int allow_dups); |
371 | /* given a mark, flag it to be freed when all references are dropped */ | 371 | /* given a mark, flag it to be freed when all references are dropped */ |
372 | extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry); | 372 | extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry); |
373 | /* run all the marks in a group, and flag them to be freed */ | 373 | /* run all the marks in a group, and flag them to be freed */ |
374 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); | 374 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); |
375 | extern void fsnotify_get_mark(struct fsnotify_mark_entry *entry); | 375 | extern void fsnotify_get_mark(struct fsnotify_mark *entry); |
376 | extern void fsnotify_put_mark(struct fsnotify_mark_entry *entry); | 376 | extern void fsnotify_put_mark(struct fsnotify_mark *entry); |
377 | extern void fsnotify_unmount_inodes(struct list_head *list); | 377 | extern void fsnotify_unmount_inodes(struct list_head *list); |
378 | 378 | ||
379 | /* put here because inotify does some weird stuff when destroying watches */ | 379 | /* put here because inotify does some weird stuff when destroying watches */ |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index c21b05d25224..f16f909fbbc1 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -22,7 +22,7 @@ struct audit_tree { | |||
22 | 22 | ||
23 | struct audit_chunk { | 23 | struct audit_chunk { |
24 | struct list_head hash; | 24 | struct list_head hash; |
25 | struct fsnotify_mark_entry mark; | 25 | struct fsnotify_mark mark; |
26 | struct list_head trees; /* with root here */ | 26 | struct list_head trees; /* with root here */ |
27 | int dead; | 27 | int dead; |
28 | int count; | 28 | int count; |
@@ -134,7 +134,7 @@ static void __put_chunk(struct rcu_head *rcu) | |||
134 | audit_put_chunk(chunk); | 134 | audit_put_chunk(chunk); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void audit_tree_destroy_watch(struct fsnotify_mark_entry *entry) | 137 | static void audit_tree_destroy_watch(struct fsnotify_mark *entry) |
138 | { | 138 | { |
139 | struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); | 139 | struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); |
140 | call_rcu(&chunk->head, __put_chunk); | 140 | call_rcu(&chunk->head, __put_chunk); |
@@ -176,7 +176,7 @@ static inline struct list_head *chunk_hash(const struct inode *inode) | |||
176 | /* hash_lock & entry->lock is held by caller */ | 176 | /* hash_lock & entry->lock is held by caller */ |
177 | static void insert_hash(struct audit_chunk *chunk) | 177 | static void insert_hash(struct audit_chunk *chunk) |
178 | { | 178 | { |
179 | struct fsnotify_mark_entry *entry = &chunk->mark; | 179 | struct fsnotify_mark *entry = &chunk->mark; |
180 | struct list_head *list; | 180 | struct list_head *list; |
181 | 181 | ||
182 | if (!entry->i.inode) | 182 | if (!entry->i.inode) |
@@ -222,7 +222,7 @@ static struct audit_chunk *find_chunk(struct node *p) | |||
222 | static void untag_chunk(struct node *p) | 222 | static void untag_chunk(struct node *p) |
223 | { | 223 | { |
224 | struct audit_chunk *chunk = find_chunk(p); | 224 | struct audit_chunk *chunk = find_chunk(p); |
225 | struct fsnotify_mark_entry *entry = &chunk->mark; | 225 | struct fsnotify_mark *entry = &chunk->mark; |
226 | struct audit_chunk *new; | 226 | struct audit_chunk *new; |
227 | struct audit_tree *owner; | 227 | struct audit_tree *owner; |
228 | int size = chunk->count - 1; | 228 | int size = chunk->count - 1; |
@@ -316,7 +316,7 @@ out: | |||
316 | 316 | ||
317 | static int create_chunk(struct inode *inode, struct audit_tree *tree) | 317 | static int create_chunk(struct inode *inode, struct audit_tree *tree) |
318 | { | 318 | { |
319 | struct fsnotify_mark_entry *entry; | 319 | struct fsnotify_mark *entry; |
320 | struct audit_chunk *chunk = alloc_chunk(1); | 320 | struct audit_chunk *chunk = alloc_chunk(1); |
321 | if (!chunk) | 321 | if (!chunk) |
322 | return -ENOMEM; | 322 | return -ENOMEM; |
@@ -354,7 +354,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree) | |||
354 | /* the first tagged inode becomes root of tree */ | 354 | /* the first tagged inode becomes root of tree */ |
355 | static int tag_chunk(struct inode *inode, struct audit_tree *tree) | 355 | static int tag_chunk(struct inode *inode, struct audit_tree *tree) |
356 | { | 356 | { |
357 | struct fsnotify_mark_entry *old_entry, *chunk_entry; | 357 | struct fsnotify_mark *old_entry, *chunk_entry; |
358 | struct audit_tree *owner; | 358 | struct audit_tree *owner; |
359 | struct audit_chunk *chunk, *old; | 359 | struct audit_chunk *chunk, *old; |
360 | struct node *p; | 360 | struct node *p; |
@@ -911,7 +911,7 @@ static int audit_tree_handle_event(struct fsnotify_group *group, struct fsnotify | |||
911 | return -EOPNOTSUPP; | 911 | return -EOPNOTSUPP; |
912 | } | 912 | } |
913 | 913 | ||
914 | static void audit_tree_freeing_mark(struct fsnotify_mark_entry *entry, struct fsnotify_group *group) | 914 | static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify_group *group) |
915 | { | 915 | { |
916 | struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); | 916 | struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); |
917 | 917 | ||
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 6304ee5d7642..d8cb55a5c059 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -56,7 +56,7 @@ struct audit_watch { | |||
56 | 56 | ||
57 | struct audit_parent { | 57 | struct audit_parent { |
58 | struct list_head watches; /* anchor for audit_watch->wlist */ | 58 | struct list_head watches; /* anchor for audit_watch->wlist */ |
59 | struct fsnotify_mark_entry mark; /* fsnotify mark on the inode */ | 59 | struct fsnotify_mark mark; /* fsnotify mark on the inode */ |
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* fsnotify handle. */ | 62 | /* fsnotify handle. */ |
@@ -72,7 +72,7 @@ static void audit_free_parent(struct audit_parent *parent) | |||
72 | kfree(parent); | 72 | kfree(parent); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void audit_watch_free_mark(struct fsnotify_mark_entry *entry) | 75 | static void audit_watch_free_mark(struct fsnotify_mark *entry) |
76 | { | 76 | { |
77 | struct audit_parent *parent; | 77 | struct audit_parent *parent; |
78 | 78 | ||
@@ -99,7 +99,7 @@ static void audit_put_parent(struct audit_parent *parent) | |||
99 | static inline struct audit_parent *audit_find_parent(struct inode *inode) | 99 | static inline struct audit_parent *audit_find_parent(struct inode *inode) |
100 | { | 100 | { |
101 | struct audit_parent *parent = NULL; | 101 | struct audit_parent *parent = NULL; |
102 | struct fsnotify_mark_entry *entry; | 102 | struct fsnotify_mark *entry; |
103 | 103 | ||
104 | spin_lock(&inode->i_lock); | 104 | spin_lock(&inode->i_lock); |
105 | entry = fsnotify_find_mark_entry(audit_watch_group, inode); | 105 | entry = fsnotify_find_mark_entry(audit_watch_group, inode); |
@@ -517,7 +517,7 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i | |||
517 | struct vfsmount *mnt, __u32 mask, void *data, | 517 | struct vfsmount *mnt, __u32 mask, void *data, |
518 | int data_type) | 518 | int data_type) |
519 | { | 519 | { |
520 | struct fsnotify_mark_entry *entry; | 520 | struct fsnotify_mark *entry; |
521 | bool send; | 521 | bool send; |
522 | 522 | ||
523 | spin_lock(&inode->i_lock); | 523 | spin_lock(&inode->i_lock); |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 853185f7ba7e..b87a63beb66c 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1724,7 +1724,7 @@ static inline void handle_one(const struct inode *inode) | |||
1724 | struct audit_tree_refs *p; | 1724 | struct audit_tree_refs *p; |
1725 | struct audit_chunk *chunk; | 1725 | struct audit_chunk *chunk; |
1726 | int count; | 1726 | int count; |
1727 | if (likely(hlist_empty(&inode->i_fsnotify_mark_entries))) | 1727 | if (likely(hlist_empty(&inode->i_fsnotify_marks))) |
1728 | return; | 1728 | return; |
1729 | context = current->audit_context; | 1729 | context = current->audit_context; |
1730 | p = context->trees; | 1730 | p = context->trees; |
@@ -1767,7 +1767,7 @@ retry: | |||
1767 | seq = read_seqbegin(&rename_lock); | 1767 | seq = read_seqbegin(&rename_lock); |
1768 | for(;;) { | 1768 | for(;;) { |
1769 | struct inode *inode = d->d_inode; | 1769 | struct inode *inode = d->d_inode; |
1770 | if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_mark_entries))) { | 1770 | if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) { |
1771 | struct audit_chunk *chunk; | 1771 | struct audit_chunk *chunk; |
1772 | chunk = audit_tree_lookup(inode); | 1772 | chunk = audit_tree_lookup(inode); |
1773 | if (chunk) { | 1773 | if (chunk) { |