Lines Matching +full:wait +full:- +full:pin
1 // SPDX-License-Identifier: GPL-2.0
10 void pin_remove(struct fs_pin *pin) in pin_remove() argument
13 hlist_del_init(&pin->m_list); in pin_remove()
14 hlist_del_init(&pin->s_list); in pin_remove()
16 spin_lock_irq(&pin->wait.lock); in pin_remove()
17 pin->done = 1; in pin_remove()
18 wake_up_locked(&pin->wait); in pin_remove()
19 spin_unlock_irq(&pin->wait.lock); in pin_remove()
22 void pin_insert(struct fs_pin *pin, struct vfsmount *m) in pin_insert() argument
25 hlist_add_head(&pin->s_list, &m->mnt_sb->s_pins); in pin_insert()
26 hlist_add_head(&pin->m_list, &real_mount(m)->mnt_pins); in pin_insert()
32 wait_queue_entry_t wait; in pin_kill() local
38 init_wait(&wait); in pin_kill()
39 spin_lock_irq(&p->wait.lock); in pin_kill()
40 if (likely(!p->done)) { in pin_kill()
41 p->done = -1; in pin_kill()
42 spin_unlock_irq(&p->wait.lock); in pin_kill()
44 p->kill(p); in pin_kill()
47 if (p->done > 0) { in pin_kill()
48 spin_unlock_irq(&p->wait.lock); in pin_kill()
52 __add_wait_queue(&p->wait, &wait); in pin_kill()
55 spin_unlock_irq(&p->wait.lock); in pin_kill()
59 if (likely(list_empty(&wait.entry))) in pin_kill()
62 spin_lock_irq(&p->wait.lock); in pin_kill()
63 if (p->done > 0) { in pin_kill()
64 spin_unlock_irq(&p->wait.lock); in pin_kill()
76 p = READ_ONCE(m->mnt_pins.first); in mnt_pin_kill()
90 q = READ_ONCE(p->first); in group_pin_kill()