Lines Matching full:dn

47  * the same directory with dnotify their information is chained in dn
51 struct dnotify_struct *dn; member
65 struct dnotify_struct *dn; in dnotify_recalc_inode_mask() local
72 for (dn = dn_mark->dn; dn != NULL; dn = dn->dn_next) in dnotify_recalc_inode_mask()
73 new_mask |= (dn->dn_mask & ~FS_DN_MULTISHOT); in dnotify_recalc_inode_mask()
94 struct dnotify_struct *dn; in dnotify_handle_event() local
106 prev = &dn_mark->dn; in dnotify_handle_event()
107 while ((dn = *prev) != NULL) { in dnotify_handle_event()
108 if ((dn->dn_mask & test_mask) == 0) { in dnotify_handle_event()
109 prev = &dn->dn_next; in dnotify_handle_event()
112 fown = file_f_owner(dn->dn_filp); in dnotify_handle_event()
113 send_sigio(fown, dn->dn_fd, POLL_MSG); in dnotify_handle_event()
114 if (dn->dn_mask & FS_DN_MULTISHOT) in dnotify_handle_event()
115 prev = &dn->dn_next; in dnotify_handle_event()
117 *prev = dn->dn_next; in dnotify_handle_event()
118 kmem_cache_free(dnotify_struct_cache, dn); in dnotify_handle_event()
134 BUG_ON(dn_mark->dn); in dnotify_free_mark()
146 * inode. If one is found run all of the ->dn structures attached to that
155 struct dnotify_struct *dn; in dnotify_flush() local
172 prev = &dn_mark->dn; in dnotify_flush()
173 while ((dn = *prev) != NULL) { in dnotify_flush()
174 if ((dn->dn_owner == id) && (dn->dn_filp == filp)) { in dnotify_flush()
175 *prev = dn->dn_next; in dnotify_flush()
176 kmem_cache_free(dnotify_struct_cache, dn); in dnotify_flush()
180 prev = &dn->dn_next; in dnotify_flush()
187 if (dn_mark->dn == NULL) { in dnotify_flush()
228 static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark, in attach_dn() argument
233 odn = dn_mark->dn; in attach_dn()
244 dn->dn_mask = mask; in attach_dn()
245 dn->dn_fd = fd; in attach_dn()
246 dn->dn_filp = filp; in attach_dn()
247 dn->dn_owner = id; in attach_dn()
248 dn->dn_next = dn_mark->dn; in attach_dn()
249 dn_mark->dn = dn; in attach_dn()
263 struct dnotify_struct *dn; in fcntl_dirnotify() local
272 dn = NULL; in fcntl_dirnotify()
305 dn = kmem_cache_alloc(dnotify_struct_cache, GFP_KERNEL); in fcntl_dirnotify()
306 if (!dn) { in fcntl_dirnotify()
326 new_dn_mark->dn = NULL; in fcntl_dirnotify()
371 error = attach_dn(dn, dn_mark, id, fd, filp, mask); in fcntl_dirnotify()
372 /* !error means that we attached the dn to the dn_mark, so don't free it */ in fcntl_dirnotify()
374 dn = NULL; in fcntl_dirnotify()
375 /* -EEXIST means that we didn't add this new dn and used an old one. in fcntl_dirnotify()
376 * that isn't an error (and the unused dn should be freed) */ in fcntl_dirnotify()
393 if (dn) in fcntl_dirnotify()
394 kmem_cache_free(dnotify_struct_cache, dn); in fcntl_dirnotify()