1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 259eda0e0SAl Viro #include <linux/wait.h> 3efb170c2SAl Viro 4efb170c2SAl Viro struct fs_pin { 559eda0e0SAl Viro wait_queue_head_t wait; 659eda0e0SAl Viro int done; 7efb170c2SAl Viro struct hlist_node s_list; 8efb170c2SAl Viro struct hlist_node m_list; 9efb170c2SAl Viro void (*kill)(struct fs_pin *); 10efb170c2SAl Viro }; 11efb170c2SAl Viro 1259eda0e0SAl Viro struct vfsmount; 1359eda0e0SAl Viro init_fs_pin(struct fs_pin * p,void (* kill)(struct fs_pin *))1459eda0e0SAl Virostatic inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *)) 1559eda0e0SAl Viro { 1659eda0e0SAl Viro init_waitqueue_head(&p->wait); 17820f9f14SEric W. Biederman INIT_HLIST_NODE(&p->s_list); 18820f9f14SEric W. Biederman INIT_HLIST_NODE(&p->m_list); 1959eda0e0SAl Viro p->kill = kill; 2059eda0e0SAl Viro } 2159eda0e0SAl Viro 22efb170c2SAl Viro void pin_remove(struct fs_pin *); 23efb170c2SAl Viro void pin_insert(struct fs_pin *, struct vfsmount *); 2459eda0e0SAl Viro void pin_kill(struct fs_pin *); 25