diff options
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index fae59d69d01a..4390f6f4047d 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -152,21 +152,6 @@ out: | |||
152 | unlock_buffer(bd->bd_bh); | 152 | unlock_buffer(bd->bd_bh); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void buf_lo_incore_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) | ||
156 | { | ||
157 | struct list_head *head = &tr->tr_list_buf; | ||
158 | struct gfs2_bufdata *bd; | ||
159 | |||
160 | gfs2_log_lock(sdp); | ||
161 | while (!list_empty(head)) { | ||
162 | bd = list_entry(head->next, struct gfs2_bufdata, bd_list_tr); | ||
163 | list_del_init(&bd->bd_list_tr); | ||
164 | tr->tr_num_buf--; | ||
165 | } | ||
166 | gfs2_log_unlock(sdp); | ||
167 | gfs2_assert_warn(sdp, !tr->tr_num_buf); | ||
168 | } | ||
169 | |||
170 | static void buf_lo_before_commit(struct gfs2_sbd *sdp) | 155 | static void buf_lo_before_commit(struct gfs2_sbd *sdp) |
171 | { | 156 | { |
172 | struct buffer_head *bh; | 157 | struct buffer_head *bh; |
@@ -419,8 +404,10 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, | |||
419 | blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset)); | 404 | blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset)); |
420 | 405 | ||
421 | error = gfs2_revoke_add(sdp, blkno, start); | 406 | error = gfs2_revoke_add(sdp, blkno, start); |
422 | if (error < 0) | 407 | if (error < 0) { |
408 | brelse(bh); | ||
423 | return error; | 409 | return error; |
410 | } | ||
424 | else if (error) | 411 | else if (error) |
425 | sdp->sd_found_revokes++; | 412 | sdp->sd_found_revokes++; |
426 | 413 | ||
@@ -737,7 +724,6 @@ static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) | |||
737 | 724 | ||
738 | const struct gfs2_log_operations gfs2_buf_lops = { | 725 | const struct gfs2_log_operations gfs2_buf_lops = { |
739 | .lo_add = buf_lo_add, | 726 | .lo_add = buf_lo_add, |
740 | .lo_incore_commit = buf_lo_incore_commit, | ||
741 | .lo_before_commit = buf_lo_before_commit, | 727 | .lo_before_commit = buf_lo_before_commit, |
742 | .lo_after_commit = buf_lo_after_commit, | 728 | .lo_after_commit = buf_lo_after_commit, |
743 | .lo_before_scan = buf_lo_before_scan, | 729 | .lo_before_scan = buf_lo_before_scan, |
@@ -763,7 +749,6 @@ const struct gfs2_log_operations gfs2_rg_lops = { | |||
763 | 749 | ||
764 | const struct gfs2_log_operations gfs2_databuf_lops = { | 750 | const struct gfs2_log_operations gfs2_databuf_lops = { |
765 | .lo_add = databuf_lo_add, | 751 | .lo_add = databuf_lo_add, |
766 | .lo_incore_commit = buf_lo_incore_commit, | ||
767 | .lo_before_commit = databuf_lo_before_commit, | 752 | .lo_before_commit = databuf_lo_before_commit, |
768 | .lo_after_commit = databuf_lo_after_commit, | 753 | .lo_after_commit = databuf_lo_after_commit, |
769 | .lo_scan_elements = databuf_lo_scan_elements, | 754 | .lo_scan_elements = databuf_lo_scan_elements, |