Lines Matching full:dn
48 * the same directory with dnotify their information is chained in dn
52 struct dnotify_struct *dn; member
66 struct dnotify_struct *dn; in dnotify_recalc_inode_mask() local
73 for (dn = dn_mark->dn; dn != NULL; dn = dn->dn_next) in dnotify_recalc_inode_mask()
74 new_mask |= (dn->dn_mask & ~FS_DN_MULTISHOT); in dnotify_recalc_inode_mask()
95 struct dnotify_struct *dn; in dnotify_handle_event() local
107 prev = &dn_mark->dn; in dnotify_handle_event()
108 while ((dn = *prev) != NULL) { in dnotify_handle_event()
109 if ((dn->dn_mask & test_mask) == 0) { in dnotify_handle_event()
110 prev = &dn->dn_next; in dnotify_handle_event()
113 fown = file_f_owner(dn->dn_filp); in dnotify_handle_event()
114 send_sigio(fown, dn->dn_fd, POLL_MSG); in dnotify_handle_event()
115 if (dn->dn_mask & FS_DN_MULTISHOT) in dnotify_handle_event()
116 prev = &dn->dn_next; in dnotify_handle_event()
118 *prev = dn->dn_next; in dnotify_handle_event()
119 kmem_cache_free(dnotify_struct_cache, dn); in dnotify_handle_event()
135 BUG_ON(dn_mark->dn); in dnotify_free_mark()
147 * inode. If one is found run all of the ->dn structures attached to that
156 struct dnotify_struct *dn; in dnotify_flush() local
173 prev = &dn_mark->dn; in dnotify_flush()
174 while ((dn = *prev) != NULL) { in dnotify_flush()
175 if ((dn->dn_owner == id) && (dn->dn_filp == filp)) { in dnotify_flush()
176 *prev = dn->dn_next; in dnotify_flush()
177 kmem_cache_free(dnotify_struct_cache, dn); in dnotify_flush()
181 prev = &dn->dn_next; in dnotify_flush()
188 if (dn_mark->dn == NULL) { in dnotify_flush()
229 static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark, in attach_dn() argument
234 odn = dn_mark->dn; in attach_dn()
245 dn->dn_mask = mask; in attach_dn()
246 dn->dn_fd = fd; in attach_dn()
247 dn->dn_filp = filp; in attach_dn()
248 dn->dn_owner = id; in attach_dn()
249 dn->dn_next = dn_mark->dn; in attach_dn()
250 dn_mark->dn = dn; in attach_dn()
264 struct dnotify_struct *dn; in fcntl_dirnotify() local
273 dn = NULL; in fcntl_dirnotify()
306 dn = kmem_cache_alloc(dnotify_struct_cache, GFP_KERNEL); in fcntl_dirnotify()
307 if (!dn) { in fcntl_dirnotify()
327 new_dn_mark->dn = NULL; in fcntl_dirnotify()
374 error = attach_dn(dn, dn_mark, id, fd, filp, mask); in fcntl_dirnotify()
375 /* !error means that we attached the dn to the dn_mark, so don't free it */ in fcntl_dirnotify()
377 dn = NULL; in fcntl_dirnotify()
378 /* -EEXIST means that we didn't add this new dn and used an old one. in fcntl_dirnotify()
379 * that isn't an error (and the unused dn should be freed) */ in fcntl_dirnotify()
396 if (dn) in fcntl_dirnotify()
397 kmem_cache_free(dnotify_struct_cache, dn); in fcntl_dirnotify()