Lines Matching refs:dn
49 * the same directory with dnotify their information is chained in dn
53 struct dnotify_struct *dn;
67 struct dnotify_struct *dn;
74 for (dn = dn_mark->dn; dn != NULL; dn = dn->dn_next)
75 new_mask |= (dn->dn_mask & ~FS_DN_MULTISHOT);
96 struct dnotify_struct *dn;
108 prev = &dn_mark->dn;
109 while ((dn = *prev) != NULL) {
110 if ((dn->dn_mask & test_mask) == 0) {
111 prev = &dn->dn_next;
114 fown = &dn->dn_filp->f_owner;
115 send_sigio(fown, dn->dn_fd, POLL_MSG);
116 if (dn->dn_mask & FS_DN_MULTISHOT)
117 prev = &dn->dn_next;
119 *prev = dn->dn_next;
120 kmem_cache_free(dnotify_struct_cache, dn);
136 BUG_ON(dn_mark->dn);
148 * inode. If one is found run all of the ->dn structures attached to that
157 struct dnotify_struct *dn;
174 prev = &dn_mark->dn;
175 while ((dn = *prev) != NULL) {
176 if ((dn->dn_owner == id) && (dn->dn_filp == filp)) {
177 *prev = dn->dn_next;
178 kmem_cache_free(dnotify_struct_cache, dn);
182 prev = &dn->dn_next;
189 if (dn_mark->dn == NULL) {
230 static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark,
235 odn = dn_mark->dn;
246 dn->dn_mask = mask;
247 dn->dn_fd = fd;
248 dn->dn_filp = filp;
249 dn->dn_owner = id;
250 dn->dn_next = dn_mark->dn;
251 dn_mark->dn = dn;
265 struct dnotify_struct *dn;
274 dn = NULL;
307 dn = kmem_cache_alloc(dnotify_struct_cache, GFP_KERNEL);
308 if (!dn) {
324 new_dn_mark->dn = NULL;
371 error = attach_dn(dn, dn_mark, id, fd, filp, mask);
372 /* !error means that we attached the dn to the dn_mark, so don't free it */
374 dn = NULL;
375 /* -EEXIST means that we didn't add this new dn and used an old one.
376 * that isn't an error (and the unused dn should be freed) */
393 if (dn)
394 kmem_cache_free(dnotify_struct_cache, dn);