From 65342a641726a46ec64cd0cadb51b01f9c152812 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 19 May 2016 08:25:05 -0600 Subject: [PATCH] flist: add flist_last_entry() Signed-off-by: Jens Axboe --- flist.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flist.h b/flist.h index d453e791..b4fe6e65 100644 --- a/flist.h +++ b/flist.h @@ -177,6 +177,9 @@ static inline void flist_splice_init(struct flist_head *list, #define flist_first_entry(ptr, type, member) \ flist_entry((ptr)->next, type, member) +#define flist_last_entry(ptr, type, member) \ + flist_entry((ptr)->prev, type, member) + /** * flist_for_each - iterate over a list * @pos: the &struct flist_head to use as a loop counter. -- 2.25.1