Commit b1ab1e44 authored by Steven Whitehouse's avatar Steven Whitehouse

GFS2: Remove extra "if" in gfs2_log_flush()

By reordering some of the assignments in gfs2_log_flush() it
is possible to remove one of the "if" statements as it can be
merged with one higher up the function.
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 47ba9734
...@@ -684,21 +684,19 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) ...@@ -684,21 +684,19 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
} }
trace_gfs2_log_flush(sdp, 1); trace_gfs2_log_flush(sdp, 1);
sdp->sd_log_flush_head = sdp->sd_log_head;
sdp->sd_log_flush_wrapped = 0;
tr = sdp->sd_log_tr; tr = sdp->sd_log_tr;
if (tr) { if (tr) {
sdp->sd_log_tr = NULL; sdp->sd_log_tr = NULL;
INIT_LIST_HEAD(&tr->tr_ail1_list); INIT_LIST_HEAD(&tr->tr_ail1_list);
INIT_LIST_HEAD(&tr->tr_ail2_list); INIT_LIST_HEAD(&tr->tr_ail2_list);
tr->tr_first = sdp->sd_log_flush_head;
} }
gfs2_assert_withdraw(sdp, gfs2_assert_withdraw(sdp,
sdp->sd_log_num_revoke == sdp->sd_log_commited_revoke); sdp->sd_log_num_revoke == sdp->sd_log_commited_revoke);
sdp->sd_log_flush_head = sdp->sd_log_head;
sdp->sd_log_flush_wrapped = 0;
if (tr)
tr->tr_first = sdp->sd_log_flush_head;
gfs2_ordered_write(sdp); gfs2_ordered_write(sdp);
lops_before_commit(sdp, tr); lops_before_commit(sdp, tr);
gfs2_log_flush_bio(sdp, WRITE); gfs2_log_flush_bio(sdp, WRITE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment