Lines Matching refs:on
35 * kernfs_node is on the list or not can be determined by testing the next
127 * should be performed or not only on ERR_PTR(-ENODEV).
288 * write, so we don't support them. We expect the entire buffer to come on
559 * %0 on success, -errno on failure.
564 struct kernfs_open_node *on;
568 on = kernfs_deref_open_node_locked(kn);
570 if (!on) {
572 on = kzalloc(sizeof(*on), GFP_KERNEL);
573 if (!on) {
577 atomic_set(&on->event, 1);
578 init_waitqueue_head(&on->poll);
579 INIT_LIST_HEAD(&on->files);
580 rcu_assign_pointer(kn->attr.open, on);
583 list_add_tail(&of->list, &on->files);
585 on->nr_to_release++;
609 struct kernfs_open_node *on;
614 on = kernfs_deref_open_node_locked(kn);
615 if (!on) {
624 on->nr_to_release--;
627 on->nr_mmapped--;
631 if (list_empty(&on->files)) {
633 kfree_rcu(on, rcu_head);
682 * happen on the same file. At this point, we can't easily give
683 * each file a separate locking class. Let's differentiate on
815 struct kernfs_open_node *on;
825 on = rcu_dereference(kn->attr.open);
826 ret = on && (on->nr_mmapped || on->nr_to_release);
834 struct kernfs_open_node *on;
839 on = kernfs_deref_open_node_locked(kn);
840 if (!on) {
845 list_for_each_entry(of, &on->files, list) {
851 on->nr_mmapped--;
858 WARN_ON_ONCE(on->nr_mmapped || on->nr_to_release);
878 struct kernfs_open_node *on = of_on(of);
880 poll_wait(of->file, &on->poll, wait);
882 if (of->event != atomic_read(&on->event))
934 * We want fsnotify_modify() on @kn but as the
972 * Notify @kn such that poll(2) on @kn wakes up. Maybe be called from any
979 struct kernfs_open_node *on;
986 on = rcu_dereference(kn->attr.open);
987 if (on) {
988 atomic_inc(&on->event);
989 wake_up_interruptible(&on->poll);
1031 * Return: the created node on success, ERR_PTR() value on error.