gfs2: Replace list_prepare_entry() with list_entry()
Andreas Gruenbacher
maintainerPATCH 1/1 gfs2: Replace list_prepare_entry() with list_entry()
In gfs2_before_commit(), use list_entry() instead of list_prepare_entry() for letting the iterator variables point at the list head.
Signed-off-by Andreas Gruenbacher <[email protected]>
--- fs/gfs2/lops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/gfs2/lops.c +3 -2
@@ -653,7 +653,7 @@ static void gfs2_before_commit(struct gfs2_sbd *sdp, unsigned int limit, bool is_databuf) {struct gfs2_log_descriptor *ld; -struct gfs2_bufdata *bd1 =NULL , *bd2; +struct gfs2_bufdata *bd1, *bd2;struct page *page;unsigned int num;unsigned n;
@@ -661,7 +661,8 @@ static void gfs2_before_commit(struct gfs2_sbd *sdp, unsigned int limit,gfs2_log_lock (sdp);list_sort (NULL , blist, blocknr_cmp); - bd1 = bd2 =list_prepare_entry (bd1, blist, bd_list); +/* bd1 and bd2 initially point at the list head */ + bd1 = bd2 = list_entry(blist, struct gfs2_bufdata, bd_list);while (total) { num = total;if (total > limit)
Signature · 1 line
2.35.1