From 969183bc68bc27d637d6d29e81d71cf854d0ca61 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 3 Feb 2020 19:22:45 +0100 Subject: gfs2: Switch to list_{first,last}_entry Replace open-coded versions of list_first_entry and list_last_entry with those functions. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson --- fs/gfs2/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/gfs2/super.c') diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index d664b0175946..a6bf8f1e083e 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -63,7 +63,7 @@ void gfs2_jindex_free(struct gfs2_sbd *sdp) sdp->sd_jdesc = NULL; while (!list_empty(&list)) { - jd = list_entry(list.next, struct gfs2_jdesc, jd_list); + jd = list_first_entry(&list, struct gfs2_jdesc, jd_list); gfs2_free_journal_extents(jd); list_del(&jd->jd_list); iput(jd->jd_inode); @@ -452,7 +452,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp) out: while (!list_empty(&list)) { - lfcc = list_entry(list.next, struct lfcc, list); + lfcc = list_first_entry(&list, struct lfcc, list); list_del(&lfcc->list); gfs2_glock_dq_uninit(&lfcc->gh); kfree(lfcc); -- cgit v1.2.3