blob: 7cab74d66f85476ff20c0445edc1164115091ca2 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#include <linux/wait.h>
3
4struct fs_pin {
5 wait_queue_head_t wait;
6 int done;
7 struct hlist_node s_list;
8 struct hlist_node m_list;
9 void (*kill)(struct fs_pin *);
10};
11
12struct vfsmount;
13
14static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *))
15{
16 init_waitqueue_head(&p->wait);
17 INIT_HLIST_NODE(&p->s_list);
18 INIT_HLIST_NODE(&p->m_list);
19 p->kill = kill;
20}
21
22void pin_remove(struct fs_pin *);
23void pin_insert_group(struct fs_pin *, struct vfsmount *, struct hlist_head *);
24void pin_insert(struct fs_pin *, struct vfsmount *);
25void pin_kill(struct fs_pin *);