提交 13685a16 编写于 作者: G Geert Uytterhoeven 提交者: Benjamin Herrenschmidt

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: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 c2e95c6d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册