From: Jens Axboe Date: Thu, 19 May 2016 14:25:05 +0000 (-0600) Subject: flist: add flist_last_entry() X-Git-Tag: fio-2.10~18 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=65342a641726a46ec64cd0cadb51b01f9c152812 flist: add flist_last_entry() Signed-off-by: Jens Axboe --- 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.