Whamcloud - gitweb
LU-6142 utils: use list_first/list_entry() on list heads
[fs/lustre-release.git] / lustre / utils / lfs_project.c
index ccf1c1a..83fe428 100644 (file)
@@ -371,7 +371,8 @@ static int lfs_project_iterate(const char *pathname,
                return ret;
 
        while (!list_empty(&head)) {
-               lpi = list_entry(head.next, struct lfs_project_item, lpi_list);
+               lpi = list_first_entry(&head, struct lfs_project_item,
+                                      lpi_list);
                list_del(&lpi->lpi_list);
                rc = lfs_project_handle_dir(&head, lpi->lpi_pathname,
                                             phc, func);