Skip to contentSkip to conversation

gfs2: Make use of list_is_first

PATCH New Andreas Gruenbacher 1 participant 1 message Feb 2, 2022 GFS2 file system

lore
Share & tools
lore

Andreas Gruenbacher

author maintainer
#0 lore raw

PATCH 1/1 gfs2: Make use of list_is_first

Use list_is_first() instead of open-coding it.

---
 fs/gfs2/glock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/glock.c +1 -1
index 842884524ca7..f7f296e8e506 100644
@@ -545,7 +545,7 @@ __acquires(&gl->gl_lockref.lock)
 			 * 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;
Signature · 1 line
2.33.1