Whamcloud - gitweb
LU-6142 lustre: use list_first_entry() in lustre subdirectory.
[fs/lustre-release.git] / lustre / include / cl_object.h
index e180f68..4825804 100644 (file)
@@ -2515,7 +2515,7 @@ static inline struct cl_page *cl_page_list_last(struct cl_page_list *plist)
 static inline struct cl_page *cl_page_list_first(struct cl_page_list *plist)
 {
        LASSERT(plist->pl_nr > 0);
-       return list_entry(plist->pl_pages.next, struct cl_page, cp_batch);
+       return list_first_entry(&plist->pl_pages, struct cl_page, cp_batch);
 }
 
 /**