Lines Matching refs:dn
31 * the same directory with dnotify their information is chained in dn
35 struct dnotify_struct *dn;
49 struct dnotify_struct *dn;
56 for (dn = dn_mark->dn; dn != NULL; dn = dn->dn_next)
57 new_mask |= (dn->dn_mask & ~FS_DN_MULTISHOT);
78 struct dnotify_struct *dn;
90 prev = &dn_mark->dn;
91 while ((dn = *prev) != NULL) {
92 if ((dn->dn_mask & test_mask) == 0) {
93 prev = &dn->dn_next;
96 fown = &dn->dn_filp->f_owner;
97 send_sigio(fown, dn->dn_fd, POLL_MSG);
98 if (dn->dn_mask & FS_DN_MULTISHOT)
99 prev = &dn->dn_next;
101 *prev = dn->dn_next;
102 kmem_cache_free(dnotify_struct_cache, dn);
118 BUG_ON(dn_mark->dn);
130 * inode. If one is found run all of the ->dn structures attached to that
139 struct dnotify_struct *dn;
156 prev = &dn_mark->dn;
157 while ((dn = *prev) != NULL) {
158 if ((dn->dn_owner == id) && (dn->dn_filp == filp)) {
159 *prev = dn->dn_next;
160 kmem_cache_free(dnotify_struct_cache, dn);
164 prev = &dn->dn_next;
171 if (dn_mark->dn == NULL) {
212 static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark,
217 odn = dn_mark->dn;
228 dn->dn_mask = mask;
229 dn->dn_fd = fd;
230 dn->dn_filp = filp;
231 dn->dn_owner = id;
232 dn->dn_next = dn_mark->dn;
233 dn_mark->dn = dn;
247 struct dnotify_struct *dn;
256 dn = NULL;
289 dn = kmem_cache_alloc(dnotify_struct_cache, GFP_KERNEL);
290 if (!dn) {
306 new_dn_mark->dn = NULL;
353 error = attach_dn(dn, dn_mark, id, fd, filp, mask);
354 /* !error means that we attached the dn to the dn_mark, so don't free it */
356 dn = NULL;
357 /* -EEXIST means that we didn't add this new dn and used an old one.
358 * that isn't an error (and the unused dn should be freed) */
375 if (dn)
376 kmem_cache_free(dnotify_struct_cache, dn);