struct nrs_fifo_head *head = policy->pol_private;
struct ptlrpc_nrs_request *nrq;
- nrq = unlikely(list_empty(&head->fh_list)) ? NULL :
- list_entry(head->fh_list.next, struct ptlrpc_nrs_request,
- nr_u.fifo.fr_list);
+ nrq = list_first_entry_or_null(&head->fh_list,
+ struct ptlrpc_nrs_request,
+ nr_u.fifo.fr_list);
if (likely(!peek && nrq != NULL)) {
struct ptlrpc_request *req = container_of(nrq,