2015-01-11 06:53:21 +08:00
|
|
|
#include <linux/wait.h>
|
2014-08-07 20:39:04 +08:00
|
|
|
|
|
|
|
struct fs_pin {
|
2015-01-11 06:53:21 +08:00
|
|
|
wait_queue_head_t wait;
|
|
|
|
int done;
|
2015-01-11 01:47:38 +08:00
|
|
|
struct hlist_node s_list;
|
|
|
|
struct hlist_node m_list;
|
2014-08-07 20:39:04 +08:00
|
|
|
void (*kill)(struct fs_pin *);
|
|
|
|
};
|
|
|
|
|
2015-01-11 06:53:21 +08:00
|
|
|
struct vfsmount;
|
|
|
|
|
|
|
|
static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *))
|
|
|
|
{
|
|
|
|
init_waitqueue_head(&p->wait);
|
2015-04-03 05:35:48 +08:00
|
|
|
INIT_HLIST_NODE(&p->s_list);
|
|
|
|
INIT_HLIST_NODE(&p->m_list);
|
2015-01-11 06:53:21 +08:00
|
|
|
p->kill = kill;
|
|
|
|
}
|
|
|
|
|
2014-08-07 20:39:04 +08:00
|
|
|
void pin_remove(struct fs_pin *);
|
2015-01-11 23:57:27 +08:00
|
|
|
void pin_insert_group(struct fs_pin *, struct vfsmount *, struct hlist_head *);
|
2014-08-07 20:39:04 +08:00
|
|
|
void pin_insert(struct fs_pin *, struct vfsmount *);
|
2015-01-11 06:53:21 +08:00
|
|
|
void pin_kill(struct fs_pin *);
|