Merge tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux-block.git] / include / linux / fs_pin.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
59eda0e0 2#include <linux/wait.h>
efb170c2
AV
3
4struct fs_pin {
59eda0e0
AV
5 wait_queue_head_t wait;
6 int done;
34cece2e
AV
7 struct hlist_node s_list;
8 struct hlist_node m_list;
efb170c2
AV
9 void (*kill)(struct fs_pin *);
10};
11
59eda0e0
AV
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);
820f9f14
EB
17 INIT_HLIST_NODE(&p->s_list);
18 INIT_HLIST_NODE(&p->m_list);
59eda0e0
AV
19 p->kill = kill;
20}
21
efb170c2
AV
22void pin_remove(struct fs_pin *);
23void pin_insert(struct fs_pin *, struct vfsmount *);
59eda0e0 24void pin_kill(struct fs_pin *);