/*
* How many pages are in the queue?
*/
-static inline unsigned dio_pages_present(struct dio *dio, struct dio_submit *sdio)
+static inline unsigned dio_pages_present(struct dio_submit *sdio)
{
return sdio->tail - sdio->head;
}
*/
static inline struct page *dio_get_page(struct dio *dio, struct dio_submit *sdio)
{
- if (dio_pages_present(dio, sdio) == 0) {
+ if (dio_pages_present(sdio) == 0) {
int ret;
ret = dio_refill_pages(dio, sdio);
if (ret)
return ERR_PTR(ret);
- BUG_ON(dio_pages_present(dio, sdio) == 0);
+ BUG_ON(dio_pages_present(sdio) == 0);
}
return dio->pages[sdio->head++];
}
*/
static inline void dio_cleanup(struct dio *dio, struct dio_submit *sdio)
{
- while (dio_pages_present(dio, sdio))
+ while (dio_pages_present(sdio))
page_cache_release(dio_get_page(dio, sdio));
}