gfs2: Make use of list_is_first
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 13 Jan 2022 01:54:55 +0000 (02:54 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 15 Feb 2022 14:01:40 +0000 (15:01 +0100)
Use list_is_first() instead of open-coding it.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c

index d368d9a..a12bb3e 100644 (file)
@@ -542,7 +542,7 @@ restart:
                         * some reason. If this holder is the head of the list, it
                         * means we have a blocked holder at the head, so return 1.
                         */
-                       if (gh->gh_list.prev == &gl->gl_holders)
+                       if (list_is_first(&gh->gh_list, &gl->gl_holders))
                                return 1;
                        do_error(gl, 0);
                        break;