Lines Matching refs:watch
50 * inotify_dev->up_mutex (ensures we don't re-add the same watch)
51 * inode->inotify_mutex (protects inode's watch list)
52 * inotify_handle->mutex (protects inotify_handle's watch list)
76 struct mutex up_mutex; /* synchronizes watch updates */
87 * struct inotify_kernel_event - An inotify event, originating from a watch and
106 struct inotify_watch wdata; /* inotify watch data */
165 * free_inotify_user_watch - cleans up the watch and its references
169 struct inotify_user_watch *watch;
172 watch = container_of(w, struct inotify_user_watch, wdata);
173 dev = watch->dev;
177 kmem_cache_free(watch_cachep, watch);
259 struct inotify_user_watch *watch;
263 watch = container_of(w, struct inotify_user_watch, wdata);
264 dev = watch->dev;
268 /* we can safely put the watch as we don't reference it while
351 /* you can only watch an inode if you have read permissions on it */
359 * create_watch - creates a watch on the given device.
366 struct inotify_user_watch *watch;
373 watch = kmem_cache_alloc(watch_cachep, GFP_KERNEL);
374 if (unlikely(!watch))
379 watch->dev = dev;
383 inotify_init_watch(&watch->wdata);
384 ret = inotify_add_watch(dev->ih, &watch->wdata, inode, mask);
386 free_inotify_user_watch(&watch->wdata);
675 /* we free our watch data when we get IN_IGNORED */