diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/inode.c | 2 | ||||
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 24 | ||||
-rw-r--r-- | fs/notify/group.c | 8 | ||||
-rw-r--r-- | fs/notify/inode_mark.c | 48 | ||||
-rw-r--r-- | fs/notify/inotify/inotify.h | 6 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 8 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 8 |
7 files changed, 52 insertions, 52 deletions
diff --git a/fs/inode.c b/fs/inode.c index 8e1bee998796..a2da778467bb 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -264,7 +264,7 @@ void inode_init_once(struct inode *inode) | |||
264 | INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear); | 264 | INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear); |
265 | i_size_ordered_init(inode); | 265 | i_size_ordered_init(inode); |
266 | #ifdef CONFIG_FSNOTIFY | 266 | #ifdef CONFIG_FSNOTIFY |
267 | INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries); | 267 | INIT_HLIST_HEAD(&inode->i_fsnotify_marks); |
268 | #endif | 268 | #endif |
269 | } | 269 | } |
270 | EXPORT_SYMBOL(inode_init_once); | 270 | EXPORT_SYMBOL(inode_init_once); |
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index fc3a9dc567c5..e6edae60894d 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -34,12 +34,12 @@ static struct fsnotify_group *dnotify_group __read_mostly; | |||
34 | static DEFINE_MUTEX(dnotify_mark_mutex); | 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 | * is being watched by dnotify. If multiple userspace applications are watching | 38 | * is being watched by dnotify. If multiple userspace applications are watching |
39 | * the same directory with dnotify their information is chained in dn | 39 | * the same directory with dnotify their information is chained in dn |
40 | */ | 40 | */ |
41 | struct dnotify_mark_entry { | 41 | struct dnotify_mark_entry { |
42 | struct fsnotify_mark_entry fsn_entry; | 42 | struct fsnotify_mark fsn_entry; |
43 | struct dnotify_struct *dn; | 43 | struct dnotify_struct *dn; |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -51,7 +51,7 @@ struct dnotify_mark_entry { | |||
51 | * it calls the fsnotify function so it can update the set of all events relevant | 51 | * it calls the fsnotify function so it can update the set of all events relevant |
52 | * to this inode. | 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 | __u32 new_mask, old_mask; | 56 | __u32 new_mask, old_mask; |
57 | struct dnotify_struct *dn; | 57 | struct dnotify_struct *dn; |
@@ -85,7 +85,7 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark_entry *entry) | |||
85 | static int dnotify_handle_event(struct fsnotify_group *group, | 85 | static int dnotify_handle_event(struct fsnotify_group *group, |
86 | struct fsnotify_event *event) | 86 | struct fsnotify_event *event) |
87 | { | 87 | { |
88 | struct fsnotify_mark_entry *entry = NULL; | 88 | struct fsnotify_mark *entry = NULL; |
89 | struct dnotify_mark_entry *dnentry; | 89 | struct dnotify_mark_entry *dnentry; |
90 | struct inode *to_tell; | 90 | struct inode *to_tell; |
91 | struct dnotify_struct *dn; | 91 | struct dnotify_struct *dn; |
@@ -136,7 +136,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
136 | struct inode *inode, struct vfsmount *mnt, | 136 | struct inode *inode, struct vfsmount *mnt, |
137 | __u32 mask, void *data, int data_type) | 137 | __u32 mask, void *data, int data_type) |
138 | { | 138 | { |
139 | struct fsnotify_mark_entry *entry; | 139 | struct fsnotify_mark *entry; |
140 | bool send; | 140 | bool send; |
141 | 141 | ||
142 | /* !dir_notify_enable should never get here, don't waste time checking | 142 | /* !dir_notify_enable should never get here, don't waste time checking |
@@ -163,7 +163,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group, | |||
163 | return send; | 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 | struct dnotify_mark_entry *dnentry = container_of(entry, | 168 | struct dnotify_mark_entry *dnentry = container_of(entry, |
169 | struct dnotify_mark_entry, | 169 | struct dnotify_mark_entry, |
@@ -184,14 +184,14 @@ static struct fsnotify_ops dnotify_fsnotify_ops = { | |||
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Called every time a file is closed. Looks first for a dnotify mark on the | 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 | * mark for one relevant to this process closing the file and remove that | 188 | * mark for one relevant to this process closing the file and remove that |
189 | * dnotify_struct. If that was the last dnotify_struct also remove the | 189 | * dnotify_struct. If that was the last dnotify_struct also remove the |
190 | * fsnotify_mark_entry. | 190 | * fsnotify_mark. |
191 | */ | 191 | */ |
192 | void dnotify_flush(struct file *filp, fl_owner_t id) | 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 | struct dnotify_mark_entry *dnentry; | 195 | struct dnotify_mark_entry *dnentry; |
196 | struct dnotify_struct *dn; | 196 | struct dnotify_struct *dn; |
197 | struct dnotify_struct **prev; | 197 | struct dnotify_struct **prev; |
@@ -260,7 +260,7 @@ static __u32 convert_arg(unsigned long arg) | |||
260 | 260 | ||
261 | /* | 261 | /* |
262 | * If multiple processes watch the same inode with dnotify there is only one | 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 | * onto that mark. This function either attaches the new dnotify_struct onto | 264 | * onto that mark. This function either attaches the new dnotify_struct onto |
265 | * that list, or it |= the mask onto an existing dnofiy_struct. | 265 | * that list, or it |= the mask onto an existing dnofiy_struct. |
266 | */ | 266 | */ |
@@ -298,7 +298,7 @@ static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark_entry *dnent | |||
298 | int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | 298 | int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) |
299 | { | 299 | { |
300 | struct dnotify_mark_entry *new_dnentry, *dnentry; | 300 | struct dnotify_mark_entry *new_dnentry, *dnentry; |
301 | struct fsnotify_mark_entry *new_entry, *entry; | 301 | struct fsnotify_mark *new_entry, *entry; |
302 | struct dnotify_struct *dn; | 302 | struct dnotify_struct *dn; |
303 | struct inode *inode; | 303 | struct inode *inode; |
304 | fl_owner_t id = current->files; | 304 | fl_owner_t id = current->files; |
@@ -378,7 +378,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | |||
378 | /* if (f != filp) means that we lost a race and another task/thread | 378 | /* if (f != filp) means that we lost a race and another task/thread |
379 | * actually closed the fd we are still playing with before we grabbed | 379 | * actually closed the fd we are still playing with before we grabbed |
380 | * the dnotify_mark_mutex and entry->lock. Since closing the fd is the | 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 | * the list. */ | 382 | * the list. */ |
383 | if (f != filp) { | 383 | if (f != filp) { |
384 | /* if we added ourselves, shoot ourselves, it's possible that | 384 | /* if we added ourselves, shoot ourselves, it's possible that |
diff --git a/fs/notify/group.c b/fs/notify/group.c index aa4654fe6ec2..b70e7d21dfde 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c | |||
@@ -74,10 +74,10 @@ void fsnotify_recalc_group_mask(struct fsnotify_group *group) | |||
74 | { | 74 | { |
75 | __u32 mask = 0; | 75 | __u32 mask = 0; |
76 | __u32 old_mask = group->mask; | 76 | __u32 old_mask = group->mask; |
77 | struct fsnotify_mark_entry *entry; | 77 | struct fsnotify_mark *entry; |
78 | 78 | ||
79 | spin_lock(&group->mark_lock); | 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 | mask |= entry->mask; | 81 | mask |= entry->mask; |
82 | spin_unlock(&group->mark_lock); | 82 | spin_unlock(&group->mark_lock); |
83 | 83 | ||
@@ -133,7 +133,7 @@ void fsnotify_final_destroy_group(struct fsnotify_group *group) | |||
133 | */ | 133 | */ |
134 | static void fsnotify_destroy_group(struct fsnotify_group *group) | 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 | fsnotify_clear_marks_by_group(group); | 137 | fsnotify_clear_marks_by_group(group); |
138 | 138 | ||
139 | /* past the point of no return, matches the initial value of 1 */ | 139 | /* past the point of no return, matches the initial value of 1 */ |
@@ -224,7 +224,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) | |||
224 | INIT_LIST_HEAD(&group->vfsmount_group_list); | 224 | INIT_LIST_HEAD(&group->vfsmount_group_list); |
225 | 225 | ||
226 | spin_lock_init(&group->mark_lock); | 226 | spin_lock_init(&group->mark_lock); |
227 | INIT_LIST_HEAD(&group->mark_entries); | 227 | INIT_LIST_HEAD(&group->marks_list); |
228 | 228 | ||
229 | group->ops = ops; | 229 | group->ops = ops; |
230 | 230 | ||
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index b00065842b3e..7e69f6b08d4e 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -38,12 +38,12 @@ | |||
38 | * that lock to dereference either of these things (they could be NULL even with | 38 | * that lock to dereference either of these things (they could be NULL even with |
39 | * the lock) | 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 | * and each entry is hooked via the g_list. It also sorta protects the | 42 | * and each entry is hooked via the g_list. It also sorta protects the |
43 | * free_g_list, which when used is anchored by a private list on the stack of the | 43 | * free_g_list, which when used is anchored by a private list on the stack of the |
44 | * task which held the group->mark_lock. | 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 | * given inode and each entry is hooked via the i_list. (and sorta the | 47 | * given inode and each entry is hooked via the i_list. (and sorta the |
48 | * free_i_list) | 48 | * free_i_list) |
49 | * | 49 | * |
@@ -61,7 +61,7 @@ | |||
61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) | 61 | * need to be cleaned up. (fsnotify_clear_marks_by_group) |
62 | * | 62 | * |
63 | * Worst case we are given an inode and need to clean up all the marks on that | 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 | * mark on the list we take a reference (so the mark can't disappear under us). | 65 | * mark on the list we take a reference (so the mark can't disappear under us). |
66 | * We remove that mark form the inode's list of marks and we add this mark to a | 66 | * We remove that mark form the inode's list of marks and we add this mark to a |
67 | * private list anchored on the stack using i_free_list; At this point we no | 67 | * private list anchored on the stack using i_free_list; At this point we no |
@@ -95,12 +95,12 @@ | |||
95 | #include <linux/fsnotify_backend.h> | 95 | #include <linux/fsnotify_backend.h> |
96 | #include "fsnotify.h" | 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 | atomic_inc(&entry->refcnt); | 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 | if (atomic_dec_and_test(&entry->refcnt)) | 105 | if (atomic_dec_and_test(&entry->refcnt)) |
106 | entry->free_mark(entry); | 106 | entry->free_mark(entry); |
@@ -111,13 +111,13 @@ void fsnotify_put_mark(struct fsnotify_mark_entry *entry) | |||
111 | */ | 111 | */ |
112 | static void fsnotify_recalc_inode_mask_locked(struct inode *inode) | 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 | struct hlist_node *pos; | 115 | struct hlist_node *pos; |
116 | __u32 new_mask = 0; | 116 | __u32 new_mask = 0; |
117 | 117 | ||
118 | assert_spin_locked(&inode->i_lock); | 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 | new_mask |= entry->mask; | 121 | new_mask |= entry->mask; |
122 | inode->i_fsnotify_mask = new_mask; | 122 | inode->i_fsnotify_mask = new_mask; |
123 | } | 123 | } |
@@ -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 *entry) | 143 | void fsnotify_destroy_mark_by_entry(struct fsnotify_mark *entry) |
144 | { | 144 | { |
145 | struct fsnotify_group *group; | 145 | struct fsnotify_group *group; |
146 | struct inode *inode; | 146 | struct inode *inode; |
@@ -174,7 +174,7 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | |||
174 | fsnotify_put_mark(entry); /* for i_list and g_list */ | 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 | * hold the inode->i_lock, so this is the perfect time to update the | 178 | * hold the inode->i_lock, so this is the perfect time to update the |
179 | * inode->i_fsnotify_mask | 179 | * inode->i_fsnotify_mask |
180 | */ | 180 | */ |
@@ -221,11 +221,11 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | |||
221 | */ | 221 | */ |
222 | void fsnotify_clear_marks_by_group(struct fsnotify_group *group) | 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 | LIST_HEAD(free_list); | 225 | LIST_HEAD(free_list); |
226 | 226 | ||
227 | spin_lock(&group->mark_lock); | 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 | list_add(&entry->free_g_list, &free_list); | 229 | list_add(&entry->free_g_list, &free_list); |
230 | list_del_init(&entry->g_list); | 230 | list_del_init(&entry->g_list); |
231 | fsnotify_get_mark(entry); | 231 | fsnotify_get_mark(entry); |
@@ -243,12 +243,12 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group) | |||
243 | */ | 243 | */ |
244 | void fsnotify_clear_marks_by_inode(struct inode *inode) | 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 | struct hlist_node *pos, *n; | 247 | struct hlist_node *pos, *n; |
248 | LIST_HEAD(free_list); | 248 | LIST_HEAD(free_list); |
249 | 249 | ||
250 | spin_lock(&inode->i_lock); | 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 | list_add(&entry->i.free_i_list, &free_list); | 252 | list_add(&entry->i.free_i_list, &free_list); |
253 | hlist_del_init(&entry->i.i_list); | 253 | hlist_del_init(&entry->i.i_list); |
254 | fsnotify_get_mark(entry); | 254 | fsnotify_get_mark(entry); |
@@ -265,15 +265,15 @@ 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_entry *fsnotify_find_mark_entry(struct fsnotify_group *group, | 268 | struct fsnotify_mark *fsnotify_find_mark_entry(struct fsnotify_group *group, |
269 | struct inode *inode) | 269 | struct inode *inode) |
270 | { | 270 | { |
271 | struct fsnotify_mark_entry *entry; | 271 | struct fsnotify_mark *entry; |
272 | struct hlist_node *pos; | 272 | struct hlist_node *pos; |
273 | 273 | ||
274 | assert_spin_locked(&inode->i_lock); | 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 | if (entry->group == group) { | 277 | if (entry->group == group) { |
278 | fsnotify_get_mark(entry); | 278 | fsnotify_get_mark(entry); |
279 | return entry; | 279 | return entry; |
@@ -282,7 +282,7 @@ struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *grou | |||
282 | return NULL; | 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 | assert_spin_locked(&old->lock); | 287 | assert_spin_locked(&old->lock); |
288 | new->i.inode = old->i.inode; | 288 | new->i.inode = old->i.inode; |
@@ -294,8 +294,8 @@ void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_ma | |||
294 | /* | 294 | /* |
295 | * Nothing fancy, just initialize lists and locks and counters. | 295 | * Nothing fancy, just initialize lists and locks and counters. |
296 | */ | 296 | */ |
297 | void fsnotify_init_mark(struct fsnotify_mark_entry *entry, | 297 | void fsnotify_init_mark(struct fsnotify_mark *entry, |
298 | void (*free_mark)(struct fsnotify_mark_entry *entry)) | 298 | void (*free_mark)(struct fsnotify_mark *entry)) |
299 | { | 299 | { |
300 | spin_lock_init(&entry->lock); | 300 | spin_lock_init(&entry->lock); |
301 | atomic_set(&entry->refcnt, 1); | 301 | atomic_set(&entry->refcnt, 1); |
@@ -311,11 +311,11 @@ void fsnotify_init_mark(struct fsnotify_mark_entry *entry, | |||
311 | * These marks may be used for the fsnotify backend to determine which | 311 | * These marks may be used for the fsnotify backend to determine which |
312 | * event types should be delivered to which group and for which inodes. | 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 | struct fsnotify_group *group, struct inode *inode, | 315 | struct fsnotify_group *group, struct inode *inode, |
316 | int allow_dups) | 316 | int allow_dups) |
317 | { | 317 | { |
318 | struct fsnotify_mark_entry *lentry = NULL; | 318 | struct fsnotify_mark *lentry = NULL; |
319 | int ret = 0; | 319 | int ret = 0; |
320 | 320 | ||
321 | inode = igrab(inode); | 321 | inode = igrab(inode); |
@@ -354,8 +354,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
354 | entry->group = group; | 354 | entry->group = group; |
355 | entry->i.inode = inode; | 355 | entry->i.inode = inode; |
356 | 356 | ||
357 | hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_mark_entries); | 357 | hlist_add_head(&entry->i.i_list, &inode->i_fsnotify_marks); |
358 | list_add(&entry->g_list, &group->mark_entries); | 358 | list_add(&entry->g_list, &group->marks_list); |
359 | 359 | ||
360 | fsnotify_get_mark(entry); /* for i_list and g_list */ | 360 | fsnotify_get_mark(entry); /* for i_list and g_list */ |
361 | 361 | ||
diff --git a/fs/notify/inotify/inotify.h b/fs/notify/inotify/inotify.h index f234f3a4c8ca..07be6df2428f 100644 --- a/fs/notify/inotify/inotify.h +++ b/fs/notify/inotify/inotify.h | |||
@@ -10,12 +10,12 @@ struct inotify_event_private_data { | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | struct inotify_inode_mark_entry { | 12 | struct inotify_inode_mark_entry { |
13 | /* fsnotify_mark_entry MUST be the first thing */ | 13 | /* fsnotify_mark MUST be the first thing */ |
14 | struct fsnotify_mark_entry fsn_entry; | 14 | struct fsnotify_mark fsn_entry; |
15 | int wd; | 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 | struct fsnotify_group *group); | 19 | struct fsnotify_group *group); |
20 | extern void inotify_free_event_priv(struct fsnotify_event_private_data *event_priv); | 20 | extern void inotify_free_event_priv(struct fsnotify_event_private_data *event_priv); |
21 | 21 | ||
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 3edb51cfcfbe..f33a9bd32e5d 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -88,7 +88,7 @@ static int inotify_merge(struct list_head *list, struct fsnotify_event *event) | |||
88 | 88 | ||
89 | static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_event *event) | 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 | struct inotify_inode_mark_entry *ientry; | 92 | struct inotify_inode_mark_entry *ientry; |
93 | struct inode *to_tell; | 93 | struct inode *to_tell; |
94 | struct inotify_event_private_data *event_priv; | 94 | struct inotify_event_private_data *event_priv; |
@@ -135,7 +135,7 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev | |||
135 | return ret; | 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 | inotify_ignored_and_remove_idr(entry, group); | 140 | inotify_ignored_and_remove_idr(entry, group); |
141 | } | 141 | } |
@@ -144,7 +144,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode | |||
144 | struct vfsmount *mnt, __u32 mask, void *data, | 144 | struct vfsmount *mnt, __u32 mask, void *data, |
145 | int data_type) | 145 | int data_type) |
146 | { | 146 | { |
147 | struct fsnotify_mark_entry *entry; | 147 | struct fsnotify_mark *entry; |
148 | bool send; | 148 | bool send; |
149 | 149 | ||
150 | spin_lock(&inode->i_lock); | 150 | spin_lock(&inode->i_lock); |
@@ -171,7 +171,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode | |||
171 | */ | 171 | */ |
172 | static int idr_callback(int id, void *p, void *data) | 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 | struct inotify_inode_mark_entry *ientry; | 175 | struct inotify_inode_mark_entry *ientry; |
176 | static bool warned = false; | 176 | static bool warned = false; |
177 | 177 | ||
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 4b1587f9df3b..7be5dcf07ac7 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -386,7 +386,7 @@ static struct inotify_inode_mark_entry *inotify_idr_find_locked(struct fsnotify_ | |||
386 | 386 | ||
387 | ientry = idr_find(idr, wd); | 387 | ientry = idr_find(idr, wd); |
388 | if (ientry) { | 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 | fsnotify_get_mark(fsn_entry); | 391 | fsnotify_get_mark(fsn_entry); |
392 | /* One ref for being in the idr, one ref we just took */ | 392 | /* One ref for being in the idr, one ref we just took */ |
@@ -499,7 +499,7 @@ out: | |||
499 | /* | 499 | /* |
500 | * Send IN_IGNORED for this wd, remove this wd from the idr. | 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 | struct fsnotify_group *group) | 503 | struct fsnotify_group *group) |
504 | { | 504 | { |
505 | struct inotify_inode_mark_entry *ientry; | 505 | struct inotify_inode_mark_entry *ientry; |
@@ -541,7 +541,7 @@ skip_send_ignore: | |||
541 | } | 541 | } |
542 | 542 | ||
543 | /* ding dong the mark is dead */ | 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 | struct inotify_inode_mark_entry *ientry; | 546 | struct inotify_inode_mark_entry *ientry; |
547 | 547 | ||
@@ -554,7 +554,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, | |||
554 | struct inode *inode, | 554 | struct inode *inode, |
555 | u32 arg) | 555 | u32 arg) |
556 | { | 556 | { |
557 | struct fsnotify_mark_entry *entry; | 557 | struct fsnotify_mark *entry; |
558 | struct inotify_inode_mark_entry *ientry; | 558 | struct inotify_inode_mark_entry *ientry; |
559 | __u32 old_mask, new_mask; | 559 | __u32 old_mask, new_mask; |
560 | __u32 mask; | 560 | __u32 mask; |