Al Viro | 59eda0e | 2015-01-10 17:53:21 -0500 | [diff] [blame] | 1 | #include <linux/wait.h> |
Al Viro | efb170c | 2014-08-07 08:39:04 -0400 | [diff] [blame] | 2 | |
| 3 | struct fs_pin { |
Al Viro | 59eda0e | 2015-01-10 17:53:21 -0500 | [diff] [blame] | 4 | wait_queue_head_t wait; |
| 5 | int done; |
Al Viro | 34cece2 | 2015-01-10 12:47:38 -0500 | [diff] [blame] | 6 | struct hlist_node s_list; |
| 7 | struct hlist_node m_list; |
Al Viro | efb170c | 2014-08-07 08:39:04 -0400 | [diff] [blame] | 8 | void (*kill)(struct fs_pin *); |
| 9 | }; |
| 10 | |
Al Viro | 59eda0e | 2015-01-10 17:53:21 -0500 | [diff] [blame] | 11 | struct vfsmount; |
| 12 | |
| 13 | static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *)) |
| 14 | { |
| 15 | init_waitqueue_head(&p->wait); |
| 16 | p->kill = kill; |
| 17 | } |
| 18 | |
Al Viro | efb170c | 2014-08-07 08:39:04 -0400 | [diff] [blame] | 19 | void pin_remove(struct fs_pin *); |
Al Viro | fdab684 | 2015-01-11 10:57:27 -0500 | [diff] [blame] | 20 | void pin_insert_group(struct fs_pin *, struct vfsmount *, struct hlist_head *); |
Al Viro | efb170c | 2014-08-07 08:39:04 -0400 | [diff] [blame] | 21 | void pin_insert(struct fs_pin *, struct vfsmount *); |
Al Viro | 59eda0e | 2015-01-10 17:53:21 -0500 | [diff] [blame] | 22 | void pin_kill(struct fs_pin *); |