Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsnotify: rename fsnotify_mark_entry to just fsnotify_mark

The name is long and it serves no real purpose. So rename
fsnotify_mark_entry to just fsnotify_mark.

Signed-off-by: Eric Paris <eparis@redhat.com>

+94 -94
+1 -1
fs/inode.c
··· 264 264 INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear); 265 265 i_size_ordered_init(inode); 266 266 #ifdef CONFIG_FSNOTIFY 267 - INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries); 267 + INIT_HLIST_HEAD(&inode->i_fsnotify_marks); 268 268 #endif 269 269 } 270 270 EXPORT_SYMBOL(inode_init_once);
+12 -12
fs/notify/dnotify/dnotify.c
··· 34 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 38 * is being watched by dnotify. If multiple userspace applications are watching 39 39 * the same directory with dnotify their information is chained in dn 40 40 */ 41 41 struct dnotify_mark_entry { 42 - struct fsnotify_mark_entry fsn_entry; 42 + struct fsnotify_mark fsn_entry; 43 43 struct dnotify_struct *dn; 44 44 }; 45 45 ··· 51 51 * it calls the fsnotify function so it can update the set of all events relevant 52 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 56 __u32 new_mask, old_mask; 57 57 struct dnotify_struct *dn; ··· 85 85 static int dnotify_handle_event(struct fsnotify_group *group, 86 86 struct fsnotify_event *event) 87 87 { 88 - struct fsnotify_mark_entry *entry = NULL; 88 + struct fsnotify_mark *entry = NULL; 89 89 struct dnotify_mark_entry *dnentry; 90 90 struct inode *to_tell; 91 91 struct dnotify_struct *dn; ··· 136 136 struct inode *inode, struct vfsmount *mnt, 137 137 __u32 mask, void *data, int data_type) 138 138 { 139 - struct fsnotify_mark_entry *entry; 139 + struct fsnotify_mark *entry; 140 140 bool send; 141 141 142 142 /* !dir_notify_enable should never get here, don't waste time checking ··· 163 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 168 struct dnotify_mark_entry *dnentry = container_of(entry, 169 169 struct dnotify_mark_entry, ··· 184 184 185 185 /* 186 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 188 * mark for one relevant to this process closing the file and remove that 189 189 * dnotify_struct. If that was the last dnotify_struct also remove the 190 - * fsnotify_mark_entry. 190 + * fsnotify_mark. 191 191 */ 192 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 195 struct dnotify_mark_entry *dnentry; 196 196 struct dnotify_struct *dn; 197 197 struct dnotify_struct **prev; ··· 260 260 261 261 /* 262 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 264 * onto that mark. This function either attaches the new dnotify_struct onto 265 265 * that list, or it |= the mask onto an existing dnofiy_struct. 266 266 */ ··· 298 298 int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) 299 299 { 300 300 struct dnotify_mark_entry *new_dnentry, *dnentry; 301 - struct fsnotify_mark_entry *new_entry, *entry; 301 + struct fsnotify_mark *new_entry, *entry; 302 302 struct dnotify_struct *dn; 303 303 struct inode *inode; 304 304 fl_owner_t id = current->files; ··· 378 378 /* if (f != filp) means that we lost a race and another task/thread 379 379 * actually closed the fd we are still playing with before we grabbed 380 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 382 * the list. */ 383 383 if (f != filp) { 384 384 /* if we added ourselves, shoot ourselves, it's possible that
+4 -4
fs/notify/group.c
··· 74 74 { 75 75 __u32 mask = 0; 76 76 __u32 old_mask = group->mask; 77 - struct fsnotify_mark_entry *entry; 77 + struct fsnotify_mark *entry; 78 78 79 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 81 mask |= entry->mask; 82 82 spin_unlock(&group->mark_lock); 83 83 ··· 133 133 */ 134 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 137 fsnotify_clear_marks_by_group(group); 138 138 139 139 /* past the point of no return, matches the initial value of 1 */ ··· 224 224 INIT_LIST_HEAD(&group->vfsmount_group_list); 225 225 226 226 spin_lock_init(&group->mark_lock); 227 - INIT_LIST_HEAD(&group->mark_entries); 227 + INIT_LIST_HEAD(&group->marks_list); 228 228 229 229 group->ops = ops; 230 230
+24 -24
fs/notify/inode_mark.c
··· 38 38 * that lock to dereference either of these things (they could be NULL even with 39 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 42 * and each entry is hooked via the g_list. It also sorta protects the 43 43 * free_g_list, which when used is anchored by a private list on the stack of the 44 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 47 * given inode and each entry is hooked via the i_list. (and sorta the 48 48 * free_i_list) 49 49 * ··· 61 61 * need to be cleaned up. (fsnotify_clear_marks_by_group) 62 62 * 63 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 65 * mark on the list we take a reference (so the mark can't disappear under us). 66 66 * We remove that mark form the inode's list of marks and we add this mark to a 67 67 * private list anchored on the stack using i_free_list; At this point we no ··· 95 95 #include <linux/fsnotify_backend.h> 96 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 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 105 if (atomic_dec_and_test(&entry->refcnt)) 106 106 entry->free_mark(entry); ··· 111 111 */ 112 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 115 struct hlist_node *pos; 116 116 __u32 new_mask = 0; 117 117 118 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 121 new_mask |= entry->mask; 122 122 inode->i_fsnotify_mask = new_mask; 123 123 } ··· 140 140 * The caller had better be holding a reference to this mark so we don't actually 141 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 145 struct fsnotify_group *group; 146 146 struct inode *inode; ··· 174 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 178 * hold the inode->i_lock, so this is the perfect time to update the 179 179 * inode->i_fsnotify_mask 180 180 */ ··· 221 221 */ 222 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 225 LIST_HEAD(free_list); 226 226 227 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 229 list_add(&entry->free_g_list, &free_list); 230 230 list_del_init(&entry->g_list); 231 231 fsnotify_get_mark(entry); ··· 243 243 */ 244 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 247 struct hlist_node *pos, *n; 248 248 LIST_HEAD(free_list); 249 249 250 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 252 list_add(&entry->i.free_i_list, &free_list); 253 253 hlist_del_init(&entry->i.i_list); 254 254 fsnotify_get_mark(entry); ··· 265 265 * given a group and inode, find the mark associated with that combination. 266 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, 269 - struct inode *inode) 268 + struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, 269 + struct inode *inode) 270 270 { 271 - struct fsnotify_mark_entry *entry; 271 + struct fsnotify_mark *entry; 272 272 struct hlist_node *pos; 273 273 274 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 277 if (entry->group == group) { 278 278 fsnotify_get_mark(entry); 279 279 return entry; ··· 282 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 287 assert_spin_locked(&old->lock); 288 288 new->i.inode = old->i.inode; ··· 294 294 /* 295 295 * Nothing fancy, just initialize lists and locks and counters. 296 296 */ 297 - void fsnotify_init_mark(struct fsnotify_mark_entry *entry, 298 - void (*free_mark)(struct fsnotify_mark_entry *entry)) 297 + void fsnotify_init_mark(struct fsnotify_mark *entry, 298 + void (*free_mark)(struct fsnotify_mark *entry)) 299 299 { 300 300 spin_lock_init(&entry->lock); 301 301 atomic_set(&entry->refcnt, 1); ··· 311 311 * These marks may be used for the fsnotify backend to determine which 312 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 315 struct fsnotify_group *group, struct inode *inode, 316 316 int allow_dups) 317 317 { 318 - struct fsnotify_mark_entry *lentry = NULL; 318 + struct fsnotify_mark *lentry = NULL; 319 319 int ret = 0; 320 320 321 321 inode = igrab(inode); ··· 354 354 entry->group = group; 355 355 entry->i.inode = inode; 356 356 357 - hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_mark_entries); 358 - list_add(&entry->g_list, &group->mark_entries); 357 + hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_marks); 358 + list_add(&entry->g_list, &group->marks_list); 359 359 360 360 fsnotify_get_mark(entry); /* for i_list and g_list */ 361 361
+3 -3
fs/notify/inotify/inotify.h
··· 10 10 }; 11 11 12 12 struct inotify_inode_mark_entry { 13 - /* fsnotify_mark_entry MUST be the first thing */ 14 - struct fsnotify_mark_entry fsn_entry; 13 + /* fsnotify_mark MUST be the first thing */ 14 + struct fsnotify_mark fsn_entry; 15 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 19 struct fsnotify_group *group); 20 20 extern void inotify_free_event_priv(struct fsnotify_event_private_data *event_priv); 21 21
+4 -4
fs/notify/inotify/inotify_fsnotify.c
··· 88 88 89 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 92 struct inotify_inode_mark_entry *ientry; 93 93 struct inode *to_tell; 94 94 struct inotify_event_private_data *event_priv; ··· 135 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 140 inotify_ignored_and_remove_idr(entry, group); 141 141 } ··· 144 144 struct vfsmount *mnt, __u32 mask, void *data, 145 145 int data_type) 146 146 { 147 - struct fsnotify_mark_entry *entry; 147 + struct fsnotify_mark *entry; 148 148 bool send; 149 149 150 150 spin_lock(&inode->i_lock); ··· 171 171 */ 172 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 175 struct inotify_inode_mark_entry *ientry; 176 176 static bool warned = false; 177 177
+4 -4
fs/notify/inotify/inotify_user.c
··· 386 386 387 387 ientry = idr_find(idr, wd); 388 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 391 fsnotify_get_mark(fsn_entry); 392 392 /* One ref for being in the idr, one ref we just took */ ··· 499 499 /* 500 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 503 struct fsnotify_group *group) 504 504 { 505 505 struct inotify_inode_mark_entry *ientry; ··· 541 541 } 542 542 543 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 546 struct inotify_inode_mark_entry *ientry; 547 547 ··· 554 554 struct inode *inode, 555 555 u32 arg) 556 556 { 557 - struct fsnotify_mark_entry *entry; 557 + struct fsnotify_mark *entry; 558 558 struct inotify_inode_mark_entry *ientry; 559 559 __u32 old_mask, new_mask; 560 560 __u32 mask;
+1 -1
include/linux/fs.h
··· 768 768 769 769 #ifdef CONFIG_FSNOTIFY 770 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 772 #endif 773 773 774 774 unsigned long i_state;
+9 -9
include/linux/fsnotify.h
··· 19 19 * fsnotify_d_instantiate - instantiate a dentry for inode 20 20 * Called with dcache_lock held. 21 21 */ 22 - static inline void fsnotify_d_instantiate(struct dentry *entry, 23 - struct inode *inode) 22 + static inline void fsnotify_d_instantiate(struct dentry *dentry, 23 + struct inode *inode) 24 24 { 25 - __fsnotify_d_instantiate(entry, inode); 25 + __fsnotify_d_instantiate(dentry, inode); 26 26 } 27 27 28 28 /* Notify this dentry's parent about a child's events. */ ··· 35 35 } 36 36 37 37 /* 38 - * fsnotify_d_move - entry has been moved 39 - * Called with dcache_lock and entry->d_lock held. 38 + * fsnotify_d_move - dentry has been moved 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 45 - * cares about events from this entry. 44 + * On move we need to update dentry->d_flags to indicate if the new parent 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 /*
+19 -19
include/linux/fsnotify_backend.h
··· 62 62 63 63 struct fsnotify_group; 64 64 struct fsnotify_event; 65 - struct fsnotify_mark_entry; 65 + struct fsnotify_mark; 66 66 struct fsnotify_event_private_data; 67 67 68 68 /* ··· 83 83 int data_type); 84 84 int (*handle_event)(struct fsnotify_group *group, struct fsnotify_event *event); 85 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 87 void (*free_event_priv)(struct fsnotify_event_private_data *priv); 88 88 }; 89 89 ··· 133 133 unsigned int q_len; /* events on the queue */ 134 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 */ 137 - spinlock_t mark_lock; /* protect mark_entries list */ 136 + /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ 137 + spinlock_t mark_lock; /* protect marks_list */ 138 138 atomic_t num_marks; /* 1 for each mark entry and 1 for not being 139 139 * past the point of no return when freeing 140 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 143 /* prevents double list_del of group_list. protected by global fsnotify_grp_mutex */ 144 144 bool on_inode_group_list; ··· 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 231 struct fsnotify_inode_mark { 232 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 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 240 struct fsnotify_vfsmount_mark { 241 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 243 struct list_head free_m_list; /* tmp list used when freeing this mark */ 244 244 }; 245 245 ··· 253 253 * (such as dnotify) will flush these when the open fd is closed and not at 254 254 * inode eviction or modification. 255 255 */ 256 - struct fsnotify_mark_entry { 256 + struct fsnotify_mark { 257 257 __u32 mask; /* mask this mark entry is for */ 258 258 /* we hold ref for each i_list and g_list. also one ref for each 'thing' 259 259 * in kernel that found and may be using this mark. */ 260 260 atomic_t refcnt; /* active things looking at this mark */ 261 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 263 spinlock_t lock; /* protect group and inode */ 264 264 union { 265 265 struct fsnotify_inode_mark i; ··· 269 269 #define FSNOTIFY_MARK_FLAG_INODE 0x01 270 270 #define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 271 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 275 #ifdef CONFIG_FSNOTIFY ··· 361 361 362 362 /* run all marks associated with an inode and update inode->i_fsnotify_mask */ 363 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 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 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 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 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 373 /* run all the marks in a group, and flag them to be freed */ 374 374 extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); 375 - extern void fsnotify_get_mark(struct fsnotify_mark_entry *entry); 376 - extern void fsnotify_put_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); 377 377 extern void fsnotify_unmount_inodes(struct list_head *list); 378 378 379 379 /* put here because inotify does some weird stuff when destroying watches */
+7 -7
kernel/audit_tree.c
··· 22 22 23 23 struct audit_chunk { 24 24 struct list_head hash; 25 - struct fsnotify_mark_entry mark; 25 + struct fsnotify_mark mark; 26 26 struct list_head trees; /* with root here */ 27 27 int dead; 28 28 int count; ··· 134 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 139 struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); 140 140 call_rcu(&chunk->head, __put_chunk); ··· 176 176 /* hash_lock & entry->lock is held by caller */ 177 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 180 struct list_head *list; 181 181 182 182 if (!entry->i.inode) ··· 222 222 static void untag_chunk(struct node *p) 223 223 { 224 224 struct audit_chunk *chunk = find_chunk(p); 225 - struct fsnotify_mark_entry *entry = &chunk->mark; 225 + struct fsnotify_mark *entry = &chunk->mark; 226 226 struct audit_chunk *new; 227 227 struct audit_tree *owner; 228 228 int size = chunk->count - 1; ··· 316 316 317 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 320 struct audit_chunk *chunk = alloc_chunk(1); 321 321 if (!chunk) 322 322 return -ENOMEM; ··· 354 354 /* the first tagged inode becomes root of tree */ 355 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 358 struct audit_tree *owner; 359 359 struct audit_chunk *chunk, *old; 360 360 struct node *p; ··· 911 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 916 struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); 917 917
+4 -4
kernel/audit_watch.c
··· 56 56 57 57 struct audit_parent { 58 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 62 /* fsnotify handle. */ ··· 72 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 77 struct audit_parent *parent; 78 78 ··· 99 99 static inline struct audit_parent *audit_find_parent(struct inode *inode) 100 100 { 101 101 struct audit_parent *parent = NULL; 102 - struct fsnotify_mark_entry *entry; 102 + struct fsnotify_mark *entry; 103 103 104 104 spin_lock(&inode->i_lock); 105 105 entry = fsnotify_find_mark_entry(audit_watch_group, inode); ··· 517 517 struct vfsmount *mnt, __u32 mask, void *data, 518 518 int data_type) 519 519 { 520 - struct fsnotify_mark_entry *entry; 520 + struct fsnotify_mark *entry; 521 521 bool send; 522 522 523 523 spin_lock(&inode->i_lock);
+2 -2
kernel/auditsc.c
··· 1724 1724 struct audit_tree_refs *p; 1725 1725 struct audit_chunk *chunk; 1726 1726 int count; 1727 - if (likely(hlist_empty(&inode->i_fsnotify_mark_entries))) 1727 + if (likely(hlist_empty(&inode->i_fsnotify_marks))) 1728 1728 return; 1729 1729 context = current->audit_context; 1730 1730 p = context->trees; ··· 1767 1767 seq = read_seqbegin(&rename_lock); 1768 1768 for(;;) { 1769 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 1771 struct audit_chunk *chunk; 1772 1772 chunk = audit_tree_lookup(inode); 1773 1773 if (chunk) {