diff --git a/include/linux/bvec.h b/include/linux/bvec.h index fe7a22dd133b5a3c62833fd2539668d99f20b6f8..66a737c6baa6ffa87b709ee970aeca78e207e19d 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -23,6 +23,7 @@ #include #include #include +#include /* * was unsigned short, but we might as well be ready for > 64kB I/O pages @@ -46,6 +47,11 @@ struct bvec_iter { current bvec */ }; +static inline struct page *bvec_nth_page(struct page *page, int idx) +{ + return idx == 0 ? page : nth_page(page, idx); +} + /* * various member access, note that bio_data should of course not be used * on highmem page vectors