mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
block: Add bio_list_peek()
Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list without actually removing it from the list. This is needed when you want to serialize based on the list being empty or not. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
c2e95c6d7a
commit
13685a1654
1 changed files with 5 additions and 0 deletions
|
@ -590,6 +590,11 @@ static inline void bio_list_merge_head(struct bio_list *bl,
|
|||
bl->head = bl2->head;
|
||||
}
|
||||
|
||||
static inline struct bio *bio_list_peek(struct bio_list *bl)
|
||||
{
|
||||
return bl->head;
|
||||
}
|
||||
|
||||
static inline struct bio *bio_list_pop(struct bio_list *bl)
|
||||
{
|
||||
struct bio *bio = bl->head;
|
||||
|
|
Loading…
Reference in a new issue