diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2020-02-03 19:22:45 +0100 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2020-03-27 20:08:04 +0100 |
commit | 969183bc68bc27d637d6d29e81d71cf854d0ca61 (patch) | |
tree | 5bdd741ee032cd4de11f97e59d3aee6be25b953c /fs/gfs2/bmap.c | |
parent | gfs2: Clean up inode initialization and teardown (diff) | |
download | linux-969183bc68bc27d637d6d29e81d71cf854d0ca61.tar.xz linux-969183bc68bc27d637d6d29e81d71cf854d0ca61.zip |
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 <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 08f6fbb3655e..2fe4457e1d01 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -2223,7 +2223,7 @@ void gfs2_free_journal_extents(struct gfs2_jdesc *jd) struct gfs2_journal_extent *jext; while(!list_empty(&jd->extent_list)) { - jext = list_entry(jd->extent_list.next, struct gfs2_journal_extent, list); + jext = list_first_entry(&jd->extent_list, struct gfs2_journal_extent, list); list_del(&jext->list); kfree(jext); } @@ -2244,7 +2244,7 @@ static int gfs2_add_jextent(struct gfs2_jdesc *jd, u64 lblock, u64 dblock, u64 b struct gfs2_journal_extent *jext; if (!list_empty(&jd->extent_list)) { - jext = list_entry(jd->extent_list.prev, struct gfs2_journal_extent, list); + jext = list_last_entry(&jd->extent_list, struct gfs2_journal_extent, list); if ((jext->dblock + jext->blocks) == dblock) { jext->blocks += blocks; return 0; |