diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2014-02-25 06:52:20 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-02-25 06:52:20 -0500 |
commit | b1ab1e44b4fa3df97a25cc9bcc3c99244ad6945b (patch) | |
tree | 316bbe9643e5c3b6e3ce8ad9a23f7019299a412a /fs/gfs2 | |
parent | 47ba9734403770a4c5e685b01f0a72b835dd4fff (diff) |
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: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/log.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index c1c9a29fda9c..edbd46113c28 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -684,21 +684,19 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) | |||
684 | } | 684 | } |
685 | trace_gfs2_log_flush(sdp, 1); | 685 | trace_gfs2_log_flush(sdp, 1); |
686 | 686 | ||
687 | sdp->sd_log_flush_head = sdp->sd_log_head; | ||
688 | sdp->sd_log_flush_wrapped = 0; | ||
687 | tr = sdp->sd_log_tr; | 689 | tr = sdp->sd_log_tr; |
688 | if (tr) { | 690 | if (tr) { |
689 | sdp->sd_log_tr = NULL; | 691 | sdp->sd_log_tr = NULL; |
690 | INIT_LIST_HEAD(&tr->tr_ail1_list); | 692 | INIT_LIST_HEAD(&tr->tr_ail1_list); |
691 | INIT_LIST_HEAD(&tr->tr_ail2_list); | 693 | INIT_LIST_HEAD(&tr->tr_ail2_list); |
694 | tr->tr_first = sdp->sd_log_flush_head; | ||
692 | } | 695 | } |
693 | 696 | ||
694 | gfs2_assert_withdraw(sdp, | 697 | gfs2_assert_withdraw(sdp, |
695 | sdp->sd_log_num_revoke == sdp->sd_log_commited_revoke); | 698 | sdp->sd_log_num_revoke == sdp->sd_log_commited_revoke); |
696 | 699 | ||
697 | sdp->sd_log_flush_head = sdp->sd_log_head; | ||
698 | sdp->sd_log_flush_wrapped = 0; | ||
699 | if (tr) | ||
700 | tr->tr_first = sdp->sd_log_flush_head; | ||
701 | |||
702 | gfs2_ordered_write(sdp); | 700 | gfs2_ordered_write(sdp); |
703 | lops_before_commit(sdp, tr); | 701 | lops_before_commit(sdp, tr); |
704 | gfs2_log_flush_bio(sdp, WRITE); | 702 | gfs2_log_flush_bio(sdp, WRITE); |