diff options
Diffstat (limited to 'fs/btrfs/ulist.h')
-rw-r--r-- | fs/btrfs/ulist.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/btrfs/ulist.h b/fs/btrfs/ulist.h index 6568c3527732..21bdc8ec8130 100644 --- a/fs/btrfs/ulist.h +++ b/fs/btrfs/ulist.h | |||
@@ -24,6 +24,10 @@ | |||
24 | */ | 24 | */ |
25 | #define ULIST_SIZE 16 | 25 | #define ULIST_SIZE 16 |
26 | 26 | ||
27 | struct ulist_iterator { | ||
28 | int i; | ||
29 | }; | ||
30 | |||
27 | /* | 31 | /* |
28 | * element of the list | 32 | * element of the list |
29 | */ | 33 | */ |
@@ -61,7 +65,13 @@ void ulist_fini(struct ulist *ulist); | |||
61 | void ulist_reinit(struct ulist *ulist); | 65 | void ulist_reinit(struct ulist *ulist); |
62 | struct ulist *ulist_alloc(gfp_t gfp_mask); | 66 | struct ulist *ulist_alloc(gfp_t gfp_mask); |
63 | void ulist_free(struct ulist *ulist); | 67 | void ulist_free(struct ulist *ulist); |
64 | int ulist_add(struct ulist *ulist, u64 val, unsigned long aux, gfp_t gfp_mask); | 68 | int ulist_add(struct ulist *ulist, u64 val, unsigned long aux, |
65 | struct ulist_node *ulist_next(struct ulist *ulist, struct ulist_node *prev); | 69 | gfp_t gfp_mask); |
70 | int ulist_add_merge(struct ulist *ulist, u64 val, unsigned long aux, | ||
71 | unsigned long *old_aux, gfp_t gfp_mask); | ||
72 | struct ulist_node *ulist_next(struct ulist *ulist, | ||
73 | struct ulist_iterator *uiter); | ||
74 | |||
75 | #define ULIST_ITER_INIT(uiter) ((uiter)->i = 0) | ||
66 | 76 | ||
67 | #endif | 77 | #endif |