| #include <linux/fs_pin.h> |
| static void pin_free_rcu(struct rcu_head *head) |
| kfree(container_of(head, struct fs_pin, rcu)); |
| static DEFINE_SPINLOCK(pin_lock); |
| void pin_put(struct fs_pin *p) |
| if (atomic_long_dec_and_test(&p->count)) |
| call_rcu(&p->rcu, pin_free_rcu); |
| void pin_remove(struct fs_pin *pin) |
| void pin_insert(struct fs_pin *pin, struct vfsmount *m) |
| hlist_add_head(&pin->s_list, &m->mnt_sb->s_pins); |
| hlist_add_head(&pin->m_list, &real_mount(m)->mnt_pins); |
| void mnt_pin_kill(struct mount *m) |
| p = ACCESS_ONCE(m->mnt_pins.first); |
| pin = hlist_entry(p, struct fs_pin, m_list); |
| if (!atomic_long_inc_not_zero(&pin->count)) { |
| void sb_pin_kill(struct super_block *sb) |
| p = ACCESS_ONCE(sb->s_pins.first); |
| pin = hlist_entry(p, struct fs_pin, s_list); |
| if (!atomic_long_inc_not_zero(&pin->count)) { |