···9696 to_tell = event->to_tell;97979898 spin_lock(&to_tell->i_lock);9999- entry = fsnotify_find_mark_entry(group, to_tell);9999+ entry = fsnotify_find_mark(group, to_tell);100100 spin_unlock(&to_tell->i_lock);101101102102 /* unlikely since we alreay passed dnotify_should_send_event() */···148148 return false;149149150150 spin_lock(&inode->i_lock);151151- entry = fsnotify_find_mark_entry(group, inode);151151+ entry = fsnotify_find_mark(group, inode);152152 spin_unlock(&inode->i_lock);153153154154 /* no mark means no dnotify watch */···158158 mask = (mask & ~FS_EVENT_ON_CHILD);159159 send = (mask & entry->mask);160160161161- fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */161161+ fsnotify_put_mark(entry); /* matches fsnotify_find_mark */162162163163 return send;164164}···202202 return;203203204204 spin_lock(&inode->i_lock);205205- entry = fsnotify_find_mark_entry(dnotify_group, inode);205205+ entry = fsnotify_find_mark(dnotify_group, inode);206206 spin_unlock(&inode->i_lock);207207 if (!entry)208208 return;···226226227227 /* nothing else could have found us thanks to the dnotify_mark_mutex */228228 if (dnentry->dn == NULL)229229- fsnotify_destroy_mark_by_entry(entry);229229+ fsnotify_destroy_mark(entry);230230231231 fsnotify_recalc_group_mask(dnotify_group);232232···357357358358 /* add the new_entry or find an old one. */359359 spin_lock(&inode->i_lock);360360- entry = fsnotify_find_mark_entry(dnotify_group, inode);360360+ entry = fsnotify_find_mark(dnotify_group, inode);361361 spin_unlock(&inode->i_lock);362362 if (entry) {363363 dnentry = container_of(entry, struct dnotify_mark_entry, fsn_entry);···414414 spin_unlock(&entry->lock);415415416416 if (destroy)417417- fsnotify_destroy_mark_by_entry(entry);417417+ fsnotify_destroy_mark(entry);418418419419 fsnotify_recalc_group_mask(dnotify_group);420420
+7-7
fs/notify/inode_mark.c
···5656 * - The inode is unlinked for the last time. (fsnotify_inode_remove)5757 * - The inode is being evicted from cache. (fsnotify_inode_delete)5858 * - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes)5959- * - Something explicitly requests that it be removed. (fsnotify_destroy_mark_by_entry)5959+ * - Something explicitly requests that it be removed. (fsnotify_destroy_mark)6060 * - The fsnotify_group associated with the mark is going away and all such marks6161 * need to be cleaned up. (fsnotify_clear_marks_by_group)6262 *···140140 * The caller had better be holding a reference to this mark so we don't actually141141 * do the final put under the entry->lock142142 */143143-void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry)143143+void fsnotify_destroy_mark(struct fsnotify_mark *entry)144144{145145 struct fsnotify_group *group;146146 struct inode *inode;···233233 spin_unlock(&group->mark_lock);234234235235 list_for_each_entry_safe(entry, lentry, &free_list, free_g_list) {236236- fsnotify_destroy_mark_by_entry(entry);236236+ fsnotify_destroy_mark(entry);237237 fsnotify_put_mark(entry);238238 }239239}···256256 spin_unlock(&inode->i_lock);257257258258 list_for_each_entry_safe(entry, lentry, &free_list, i.free_i_list) {259259- fsnotify_destroy_mark_by_entry(entry);259259+ fsnotify_destroy_mark(entry);260260 fsnotify_put_mark(entry);261261 }262262}···265265 * given a group and inode, find the mark associated with that combination.266266 * if found take a reference to that mark and return it, else return NULL267267 */268268-struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group,269269- struct inode *inode)268268+struct fsnotify_mark *fsnotify_find_mark(struct fsnotify_group *group,269269+ struct inode *inode)270270{271271 struct fsnotify_mark *entry;272272 struct hlist_node *pos;···349349 spin_lock(&inode->i_lock);350350351351 if (!allow_dups)352352- lentry = fsnotify_find_mark_entry(group, inode);352352+ lentry = fsnotify_find_mark(group, inode);353353 if (!lentry) {354354 entry->group = group;355355 entry->i.inode = inode;
···567567 return -EINVAL;568568569569 spin_lock(&inode->i_lock);570570- entry = fsnotify_find_mark_entry(group, inode);570570+ entry = fsnotify_find_mark(group, inode);571571 spin_unlock(&inode->i_lock);572572 if (!entry)573573 return -ENOENT;···607607 /* return the wd */608608 ret = ientry->wd;609609610610- /* match the get from fsnotify_find_mark_entry() */610610+ /* match the get from fsnotify_find_mark() */611611 fsnotify_put_mark(entry);612612613613 return ret;···823823824824 ret = 0;825825826826- fsnotify_destroy_mark_by_entry(&ientry->fsn_entry);826826+ fsnotify_destroy_mark(&ientry->fsn_entry);827827828828 /* match ref taken by inotify_idr_find */829829 fsnotify_put_mark(&ientry->fsn_entry);
+2-2
include/linux/fsnotify_backend.h
···363363extern void fsnotify_recalc_inode_mask(struct inode *inode);364364extern void fsnotify_init_mark(struct fsnotify_mark *entry, void (*free_mark)(struct fsnotify_mark *entry));365365/* find (and take a reference) to a mark associated with group and inode */366366-extern struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode);366366+extern struct fsnotify_mark *fsnotify_find_mark(struct fsnotify_group *group, struct inode *inode);367367/* copy the values from old into new */368368extern void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *old);369369/* attach the mark to both the group and the inode */370370extern int fsnotify_add_mark(struct fsnotify_mark *entry, struct fsnotify_group *group, struct inode *inode, int allow_dups);371371/* given a mark, flag it to be freed when all references are dropped */372372-extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry);372372+extern void fsnotify_destroy_mark(struct fsnotify_mark *entry);373373/* run all the marks in a group, and flag them to be freed */374374extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group);375375extern void fsnotify_get_mark(struct fsnotify_mark *entry);