diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:24 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:53 -0400 |
commit | d07754412f9cdc2f4a99318d5ee81ace6715ea99 (patch) | |
tree | f62902ad420de023c0fad931d9508903a9f42e3b | |
parent | e61ce86737b4d60521e4e71f9892fe4bdcfb688b (diff) |
fsnotify: rename fsnotify_find_mark_entry to fsnotify_find_mark
the _entry portion of fsnotify functions is useless. Drop it.
Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 14 | ||||
-rw-r--r-- | fs/notify/inode_mark.c | 14 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 4 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 6 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 4 | ||||
-rw-r--r-- | kernel/audit_tree.c | 12 | ||||
-rw-r--r-- | kernel/audit_watch.c | 8 |
7 files changed, 31 insertions, 31 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index e6edae60894d..b202bc590c61 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -96,7 +96,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
96 | to_tell = event->to_tell; | 96 | to_tell = event->to_tell; |
97 | 97 | ||
98 | spin_lock(&to_tell->i_lock); | 98 | spin_lock(&to_tell->i_lock); |
99 | entry = fsnotify_find_mark_entry(group, to_tell); | 99 | entry = fsnotify_find_mark(group, to_tell); |
100 | spin_unlock(&to_tell->i_lock); | 100 | spin_unlock(&to_tell->i_lock); |
101 | 101 | ||
102 | /* unlikely since we alreay passed dnotify_should_send_event() */ | 102 | /* unlikely since we alreay passed dnotify_should_send_event() */ |
@@ -148,7 +148,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
148 | return false; | 148 | return false; |
149 | 149 | ||
150 | spin_lock(&inode->i_lock); | 150 | spin_lock(&inode->i_lock); |
151 | entry = fsnotify_find_mark_entry(group, inode); | 151 | entry = fsnotify_find_mark(group, inode); |
152 | spin_unlock(&inode->i_lock); | 152 | spin_unlock(&inode->i_lock); |
153 | 153 | ||
154 | /* no mark means no dnotify watch */ | 154 | /* no mark means no dnotify watch */ |
@@ -158,7 +158,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
158 | mask = (mask & ~FS_EVENT_ON_CHILD); | 158 | mask = (mask & ~FS_EVENT_ON_CHILD); |
159 | send = (mask & entry->mask); | 159 | send = (mask & entry->mask); |
160 | 160 | ||
161 | fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */ | 161 | fsnotify_put_mark(entry); /* matches fsnotify_find_mark */ |
162 | 162 | ||
163 | return send; | 163 | return send; |
164 | } | 164 | } |
@@ -202,7 +202,7 @@ void dnotify_flush(struct file *filp, fl_owner_t id) | |||
202 | return; | 202 | return; |
203 | 203 | ||
204 | spin_lock(&inode->i_lock); | 204 | spin_lock(&inode->i_lock); |
205 | entry = fsnotify_find_mark_entry(dnotify_group, inode); | 205 | entry = fsnotify_find_mark(dnotify_group, inode); |
206 | spin_unlock(&inode->i_lock); | 206 | spin_unlock(&inode->i_lock); |
207 | if (!entry) | 207 | if (!entry) |
208 | return; | 208 | return; |
@@ -226,7 +226,7 @@ void dnotify_flush(struct file *filp, fl_owner_t id) | |||
226 | 226 | ||
227 | /* nothing else could have found us thanks to the dnotify_mark_mutex */ | 227 | /* nothing else could have found us thanks to the dnotify_mark_mutex */ |
228 | if (dnentry->dn == NULL) | 228 | if (dnentry->dn == NULL) |
229 | fsnotify_destroy_mark_by_entry(entry); | 229 | fsnotify_destroy_mark(entry); |
230 | 230 | ||
231 | fsnotify_recalc_group_mask(dnotify_group); | 231 | fsnotify_recalc_group_mask(dnotify_group); |
232 | 232 | ||
@@ -357,7 +357,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | |||
357 | 357 | ||
358 | /* add the new_entry or find an old one. */ | 358 | /* add the new_entry or find an old one. */ |
359 | spin_lock(&inode->i_lock); | 359 | spin_lock(&inode->i_lock); |
360 | entry = fsnotify_find_mark_entry(dnotify_group, inode); | 360 | entry = fsnotify_find_mark(dnotify_group, inode); |
361 | spin_unlock(&inode->i_lock); | 361 | spin_unlock(&inode->i_lock); |
362 | if (entry) { | 362 | if (entry) { |
363 | dnentry = container_of(entry, struct dnotify_mark_entry, fsn_entry); | 363 | dnentry = container_of(entry, struct dnotify_mark_entry, fsn_entry); |
@@ -414,7 +414,7 @@ out: | |||
414 | spin_unlock(&entry->lock); | 414 | spin_unlock(&entry->lock); |
415 | 415 | ||
416 | if (destroy) | 416 | if (destroy) |
417 | fsnotify_destroy_mark_by_entry(entry); | 417 | fsnotify_destroy_mark(entry); |
418 | 418 | ||
419 | fsnotify_recalc_group_mask(dnotify_group); | 419 | fsnotify_recalc_group_mask(dnotify_group); |
420 | 420 | ||
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 7e69f6b08d4e..01c42632eb2a 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -56,7 +56,7 @@ | |||
56 | * - The inode is unlinked for the last time. (fsnotify_inode_remove) | 56 | * - The inode is unlinked for the last time. (fsnotify_inode_remove) |
57 | * - The inode is being evicted from cache. (fsnotify_inode_delete) | 57 | * - The inode is being evicted from cache. (fsnotify_inode_delete) |
58 | * - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes) | 58 | * - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes) |
59 | * - Something explicitly requests that it be removed. (fsnotify_destroy_mark_by_entry) | 59 | * - Something explicitly requests that it be removed. (fsnotify_destroy_mark) |
60 | * - The fsnotify_group associated with the mark is going away and all such marks | 60 | * - The fsnotify_group associated with the mark is going away and all such marks |
61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) | 61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) |
62 | * | 62 | * |
@@ -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) | 143 | void fsnotify_destroy_mark(struct fsnotify_mark *entry) |
144 | { | 144 | { |
145 | struct fsnotify_group *group; | 145 | struct fsnotify_group *group; |
146 | struct inode *inode; | 146 | struct inode *inode; |
@@ -233,7 +233,7 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group) | |||
233 | spin_unlock(&group->mark_lock); | 233 | spin_unlock(&group->mark_lock); |
234 | 234 | ||
235 | list_for_each_entry_safe(entry, lentry, &free_list, free_g_list) { | 235 | list_for_each_entry_safe(entry, lentry, &free_list, free_g_list) { |
236 | fsnotify_destroy_mark_by_entry(entry); | 236 | fsnotify_destroy_mark(entry); |
237 | fsnotify_put_mark(entry); | 237 | fsnotify_put_mark(entry); |
238 | } | 238 | } |
239 | } | 239 | } |
@@ -256,7 +256,7 @@ void fsnotify_clear_marks_by_inode(struct inode *inode) | |||
256 | spin_unlock(&inode->i_lock); | 256 | spin_unlock(&inode->i_lock); |
257 | 257 | ||
258 | list_for_each_entry_safe(entry, lentry, &free_list, i.free_i_list) { | 258 | list_for_each_entry_safe(entry, lentry, &free_list, i.free_i_list) { |
259 | fsnotify_destroy_mark_by_entry(entry); | 259 | fsnotify_destroy_mark(entry); |
260 | fsnotify_put_mark(entry); | 260 | fsnotify_put_mark(entry); |
261 | } | 261 | } |
262 | } | 262 | } |
@@ -265,8 +265,8 @@ 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 *fsnotify_find_mark_entry(struct fsnotify_group *group, | 268 | struct fsnotify_mark *fsnotify_find_mark(struct fsnotify_group *group, |
269 | struct inode *inode) | 269 | struct inode *inode) |
270 | { | 270 | { |
271 | struct fsnotify_mark *entry; | 271 | struct fsnotify_mark *entry; |
272 | struct hlist_node *pos; | 272 | struct hlist_node *pos; |
@@ -349,7 +349,7 @@ int fsnotify_add_mark(struct fsnotify_mark *entry, | |||
349 | spin_lock(&inode->i_lock); | 349 | spin_lock(&inode->i_lock); |
350 | 350 | ||
351 | if (!allow_dups) | 351 | if (!allow_dups) |
352 | lentry = fsnotify_find_mark_entry(group, inode); | 352 | lentry = fsnotify_find_mark(group, inode); |
353 | if (!lentry) { | 353 | if (!lentry) { |
354 | entry->group = group; | 354 | entry->group = group; |
355 | entry->i.inode = inode; | 355 | entry->i.inode = inode; |
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index f33a9bd32e5d..f8a2a6eda133 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -98,7 +98,7 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev | |||
98 | to_tell = event->to_tell; | 98 | to_tell = event->to_tell; |
99 | 99 | ||
100 | spin_lock(&to_tell->i_lock); | 100 | spin_lock(&to_tell->i_lock); |
101 | entry = fsnotify_find_mark_entry(group, to_tell); | 101 | entry = fsnotify_find_mark(group, to_tell); |
102 | spin_unlock(&to_tell->i_lock); | 102 | spin_unlock(&to_tell->i_lock); |
103 | /* race with watch removal? We already passes should_send */ | 103 | /* race with watch removal? We already passes should_send */ |
104 | if (unlikely(!entry)) | 104 | if (unlikely(!entry)) |
@@ -148,7 +148,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode | |||
148 | bool send; | 148 | bool send; |
149 | 149 | ||
150 | spin_lock(&inode->i_lock); | 150 | spin_lock(&inode->i_lock); |
151 | entry = fsnotify_find_mark_entry(group, inode); | 151 | entry = fsnotify_find_mark(group, inode); |
152 | spin_unlock(&inode->i_lock); | 152 | spin_unlock(&inode->i_lock); |
153 | if (!entry) | 153 | if (!entry) |
154 | return false; | 154 | return false; |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 7be5dcf07ac7..118085c9d2d9 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -567,7 +567,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, | |||
567 | return -EINVAL; | 567 | return -EINVAL; |
568 | 568 | ||
569 | spin_lock(&inode->i_lock); | 569 | spin_lock(&inode->i_lock); |
570 | entry = fsnotify_find_mark_entry(group, inode); | 570 | entry = fsnotify_find_mark(group, inode); |
571 | spin_unlock(&inode->i_lock); | 571 | spin_unlock(&inode->i_lock); |
572 | if (!entry) | 572 | if (!entry) |
573 | return -ENOENT; | 573 | return -ENOENT; |
@@ -607,7 +607,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, | |||
607 | /* return the wd */ | 607 | /* return the wd */ |
608 | ret = ientry->wd; | 608 | ret = ientry->wd; |
609 | 609 | ||
610 | /* match the get from fsnotify_find_mark_entry() */ | 610 | /* match the get from fsnotify_find_mark() */ |
611 | fsnotify_put_mark(entry); | 611 | fsnotify_put_mark(entry); |
612 | 612 | ||
613 | return ret; | 613 | return ret; |
@@ -823,7 +823,7 @@ SYSCALL_DEFINE2(inotify_rm_watch, int, fd, __s32, wd) | |||
823 | 823 | ||
824 | ret = 0; | 824 | ret = 0; |
825 | 825 | ||
826 | fsnotify_destroy_mark_by_entry(&ientry->fsn_entry); | 826 | fsnotify_destroy_mark(&ientry->fsn_entry); |
827 | 827 | ||
828 | /* match ref taken by inotify_idr_find */ | 828 | /* match ref taken by inotify_idr_find */ |
829 | fsnotify_put_mark(&ientry->fsn_entry); | 829 | fsnotify_put_mark(&ientry->fsn_entry); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 59c072e8fddd..83b6bfeb2d66 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -363,13 +363,13 @@ extern struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group | |||
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, void (*free_mark)(struct fsnotify_mark *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 *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode); | 366 | extern struct fsnotify_mark *fsnotify_find_mark(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 *new, struct fsnotify_mark *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, 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); | 372 | extern void fsnotify_destroy_mark(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); | 375 | extern void fsnotify_get_mark(struct fsnotify_mark *entry); |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index f16f909fbbc1..b20fb055d712 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -250,7 +250,7 @@ static void untag_chunk(struct node *p) | |||
250 | list_del_rcu(&chunk->hash); | 250 | list_del_rcu(&chunk->hash); |
251 | spin_unlock(&hash_lock); | 251 | spin_unlock(&hash_lock); |
252 | spin_unlock(&entry->lock); | 252 | spin_unlock(&entry->lock); |
253 | fsnotify_destroy_mark_by_entry(entry); | 253 | fsnotify_destroy_mark(entry); |
254 | fsnotify_put_mark(entry); | 254 | fsnotify_put_mark(entry); |
255 | goto out; | 255 | goto out; |
256 | } | 256 | } |
@@ -293,7 +293,7 @@ static void untag_chunk(struct node *p) | |||
293 | owner->root = new; | 293 | owner->root = new; |
294 | spin_unlock(&hash_lock); | 294 | spin_unlock(&hash_lock); |
295 | spin_unlock(&entry->lock); | 295 | spin_unlock(&entry->lock); |
296 | fsnotify_destroy_mark_by_entry(entry); | 296 | fsnotify_destroy_mark(entry); |
297 | fsnotify_put_mark(entry); | 297 | fsnotify_put_mark(entry); |
298 | goto out; | 298 | goto out; |
299 | 299 | ||
@@ -333,7 +333,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree) | |||
333 | spin_unlock(&hash_lock); | 333 | spin_unlock(&hash_lock); |
334 | chunk->dead = 1; | 334 | chunk->dead = 1; |
335 | spin_unlock(&entry->lock); | 335 | spin_unlock(&entry->lock); |
336 | fsnotify_destroy_mark_by_entry(entry); | 336 | fsnotify_destroy_mark(entry); |
337 | fsnotify_put_mark(entry); | 337 | fsnotify_put_mark(entry); |
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
@@ -361,7 +361,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
361 | int n; | 361 | int n; |
362 | 362 | ||
363 | spin_lock(&inode->i_lock); | 363 | spin_lock(&inode->i_lock); |
364 | old_entry = fsnotify_find_mark_entry(audit_tree_group, inode); | 364 | old_entry = fsnotify_find_mark(audit_tree_group, inode); |
365 | spin_unlock(&inode->i_lock); | 365 | spin_unlock(&inode->i_lock); |
366 | if (!old_entry) | 366 | if (!old_entry) |
367 | return create_chunk(inode, tree); | 367 | return create_chunk(inode, tree); |
@@ -415,7 +415,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
415 | spin_unlock(&chunk_entry->lock); | 415 | spin_unlock(&chunk_entry->lock); |
416 | spin_unlock(&old_entry->lock); | 416 | spin_unlock(&old_entry->lock); |
417 | 417 | ||
418 | fsnotify_destroy_mark_by_entry(chunk_entry); | 418 | fsnotify_destroy_mark(chunk_entry); |
419 | 419 | ||
420 | fsnotify_put_mark(chunk_entry); | 420 | fsnotify_put_mark(chunk_entry); |
421 | fsnotify_put_mark(old_entry); | 421 | fsnotify_put_mark(old_entry); |
@@ -446,7 +446,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
446 | spin_unlock(&hash_lock); | 446 | spin_unlock(&hash_lock); |
447 | spin_unlock(&chunk_entry->lock); | 447 | spin_unlock(&chunk_entry->lock); |
448 | spin_unlock(&old_entry->lock); | 448 | spin_unlock(&old_entry->lock); |
449 | fsnotify_destroy_mark_by_entry(old_entry); | 449 | fsnotify_destroy_mark(old_entry); |
450 | fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */ | 450 | fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */ |
451 | fsnotify_put_mark(old_entry); /* and kill it */ | 451 | fsnotify_put_mark(old_entry); /* and kill it */ |
452 | return 0; | 452 | return 0; |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index d8cb55a5c059..24ecbebf4354 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -102,7 +102,7 @@ static inline struct audit_parent *audit_find_parent(struct inode *inode) | |||
102 | struct fsnotify_mark *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(audit_watch_group, inode); |
106 | spin_unlock(&inode->i_lock); | 106 | spin_unlock(&inode->i_lock); |
107 | 107 | ||
108 | if (entry) | 108 | if (entry) |
@@ -354,7 +354,7 @@ static void audit_remove_parent_watches(struct audit_parent *parent) | |||
354 | } | 354 | } |
355 | mutex_unlock(&audit_filter_mutex); | 355 | mutex_unlock(&audit_filter_mutex); |
356 | 356 | ||
357 | fsnotify_destroy_mark_by_entry(&parent->mark); | 357 | fsnotify_destroy_mark(&parent->mark); |
358 | 358 | ||
359 | fsnotify_recalc_group_mask(audit_watch_group); | 359 | fsnotify_recalc_group_mask(audit_watch_group); |
360 | 360 | ||
@@ -504,7 +504,7 @@ void audit_remove_watch_rule(struct audit_krule *krule) | |||
504 | 504 | ||
505 | if (list_empty(&parent->watches)) { | 505 | if (list_empty(&parent->watches)) { |
506 | audit_get_parent(parent); | 506 | audit_get_parent(parent); |
507 | fsnotify_destroy_mark_by_entry(&parent->mark); | 507 | fsnotify_destroy_mark(&parent->mark); |
508 | audit_put_parent(parent); | 508 | audit_put_parent(parent); |
509 | } | 509 | } |
510 | } | 510 | } |
@@ -521,7 +521,7 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i | |||
521 | bool send; | 521 | bool send; |
522 | 522 | ||
523 | spin_lock(&inode->i_lock); | 523 | spin_lock(&inode->i_lock); |
524 | entry = fsnotify_find_mark_entry(group, inode); | 524 | entry = fsnotify_find_mark(group, inode); |
525 | spin_unlock(&inode->i_lock); | 525 | spin_unlock(&inode->i_lock); |
526 | if (!entry) | 526 | if (!entry) |
527 | return false; | 527 | return false; |