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 /fs/notify | |
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>
Diffstat (limited to 'fs/notify')
-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 |
4 files changed, 19 insertions, 19 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); |