the _entry portion of fsnotify functions is useless. Drop it.
Signed-off-by: Eric Paris <eparis@redhat.com>
to_tell = event->to_tell;
spin_lock(&to_tell->i_lock);
- entry = fsnotify_find_mark_entry(group, to_tell);
+ entry = fsnotify_find_mark(group, to_tell);
spin_unlock(&to_tell->i_lock);
/* unlikely since we alreay passed dnotify_should_send_event() */
return false;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(group, inode);
+ entry = fsnotify_find_mark(group, inode);
spin_unlock(&inode->i_lock);
/* no mark means no dnotify watch */
mask = (mask & ~FS_EVENT_ON_CHILD);
send = (mask & entry->mask);
- fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */
+ fsnotify_put_mark(entry); /* matches fsnotify_find_mark */
return send;
}
return;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(dnotify_group, inode);
+ entry = fsnotify_find_mark(dnotify_group, inode);
spin_unlock(&inode->i_lock);
if (!entry)
return;
/* nothing else could have found us thanks to the dnotify_mark_mutex */
if (dnentry->dn == NULL)
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_recalc_group_mask(dnotify_group);
/* add the new_entry or find an old one. */
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(dnotify_group, inode);
+ entry = fsnotify_find_mark(dnotify_group, inode);
spin_unlock(&inode->i_lock);
if (entry) {
dnentry = container_of(entry, struct dnotify_mark_entry, fsn_entry);
spin_unlock(&entry->lock);
if (destroy)
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_recalc_group_mask(dnotify_group);
* - The inode is unlinked for the last time. (fsnotify_inode_remove)
* - The inode is being evicted from cache. (fsnotify_inode_delete)
* - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes)
- * - Something explicitly requests that it be removed. (fsnotify_destroy_mark_by_entry)
+ * - Something explicitly requests that it be removed. (fsnotify_destroy_mark)
* - The fsnotify_group associated with the mark is going away and all such marks
* need to be cleaned up. (fsnotify_clear_marks_by_group)
*
* The caller had better be holding a reference to this mark so we don't actually
* do the final put under the entry->lock
*/
-void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry)
+void fsnotify_destroy_mark(struct fsnotify_mark *entry)
{
struct fsnotify_group *group;
struct inode *inode;
spin_unlock(&group->mark_lock);
list_for_each_entry_safe(entry, lentry, &free_list, free_g_list) {
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
}
}
spin_unlock(&inode->i_lock);
list_for_each_entry_safe(entry, lentry, &free_list, i.free_i_list) {
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
}
}
* given a group and inode, find the mark associated with that combination.
* if found take a reference to that mark and return it, else return NULL
*/
-struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group,
- struct inode *inode)
+struct fsnotify_mark *fsnotify_find_mark(struct fsnotify_group *group,
+ struct inode *inode)
{
struct fsnotify_mark *entry;
struct hlist_node *pos;
spin_lock(&inode->i_lock);
if (!allow_dups)
- lentry = fsnotify_find_mark_entry(group, inode);
+ lentry = fsnotify_find_mark(group, inode);
if (!lentry) {
entry->group = group;
entry->i.inode = inode;
to_tell = event->to_tell;
spin_lock(&to_tell->i_lock);
- entry = fsnotify_find_mark_entry(group, to_tell);
+ entry = fsnotify_find_mark(group, to_tell);
spin_unlock(&to_tell->i_lock);
/* race with watch removal? We already passes should_send */
if (unlikely(!entry))
bool send;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(group, inode);
+ entry = fsnotify_find_mark(group, inode);
spin_unlock(&inode->i_lock);
if (!entry)
return false;
return -EINVAL;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(group, inode);
+ entry = fsnotify_find_mark(group, inode);
spin_unlock(&inode->i_lock);
if (!entry)
return -ENOENT;
/* return the wd */
ret = ientry->wd;
- /* match the get from fsnotify_find_mark_entry() */
+ /* match the get from fsnotify_find_mark() */
fsnotify_put_mark(entry);
return ret;
ret = 0;
- fsnotify_destroy_mark_by_entry(&ientry->fsn_entry);
+ fsnotify_destroy_mark(&ientry->fsn_entry);
/* match ref taken by inotify_idr_find */
fsnotify_put_mark(&ientry->fsn_entry);
extern void fsnotify_recalc_inode_mask(struct inode *inode);
extern void fsnotify_init_mark(struct fsnotify_mark *entry, void (*free_mark)(struct fsnotify_mark *entry));
/* find (and take a reference) to a mark associated with group and inode */
-extern struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode);
+extern struct fsnotify_mark *fsnotify_find_mark(struct fsnotify_group *group, struct inode *inode);
/* copy the values from old into new */
extern void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *old);
/* attach the mark to both the group and the inode */
extern int fsnotify_add_mark(struct fsnotify_mark *entry, struct fsnotify_group *group, struct inode *inode, int allow_dups);
/* given a mark, flag it to be freed when all references are dropped */
-extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry);
+extern void fsnotify_destroy_mark(struct fsnotify_mark *entry);
/* run all the marks in a group, and flag them to be freed */
extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group);
extern void fsnotify_get_mark(struct fsnotify_mark *entry);
list_del_rcu(&chunk->hash);
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
goto out;
}
owner->root = new;
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
goto out;
spin_unlock(&hash_lock);
chunk->dead = 1;
spin_unlock(&entry->lock);
- fsnotify_destroy_mark_by_entry(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
return 0;
}
int n;
spin_lock(&inode->i_lock);
- old_entry = fsnotify_find_mark_entry(audit_tree_group, inode);
+ old_entry = fsnotify_find_mark(audit_tree_group, inode);
spin_unlock(&inode->i_lock);
if (!old_entry)
return create_chunk(inode, tree);
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
- fsnotify_destroy_mark_by_entry(chunk_entry);
+ fsnotify_destroy_mark(chunk_entry);
fsnotify_put_mark(chunk_entry);
fsnotify_put_mark(old_entry);
spin_unlock(&hash_lock);
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
- fsnotify_destroy_mark_by_entry(old_entry);
+ fsnotify_destroy_mark(old_entry);
fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */
fsnotify_put_mark(old_entry); /* and kill it */
return 0;
struct fsnotify_mark *entry;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(audit_watch_group, inode);
+ entry = fsnotify_find_mark(audit_watch_group, inode);
spin_unlock(&inode->i_lock);
if (entry)
}
mutex_unlock(&audit_filter_mutex);
- fsnotify_destroy_mark_by_entry(&parent->mark);
+ fsnotify_destroy_mark(&parent->mark);
fsnotify_recalc_group_mask(audit_watch_group);
if (list_empty(&parent->watches)) {
audit_get_parent(parent);
- fsnotify_destroy_mark_by_entry(&parent->mark);
+ fsnotify_destroy_mark(&parent->mark);
audit_put_parent(parent);
}
}
bool send;
spin_lock(&inode->i_lock);
- entry = fsnotify_find_mark_entry(group, inode);
+ entry = fsnotify_find_mark(group, inode);
spin_unlock(&inode->i_lock);
if (!entry)
return false;