aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/lops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2012-04-16 11:40:56 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-04-24 11:44:36 -0400
commitc50b91c4bd511dfe844e2aa7be429b6b88406353 (patch)
tree0a9584ec238036b599bb717db5bd1a7df5c616ca /fs/gfs2/lops.c
parentdad30e9031c5927c30b402f73ac57ffbe09dc9ee (diff)
GFS2: Remove bd_list_tr
This is another clean up in the logging code. This per-transaction list was largely unused. Its main function was to ensure that the number of buffers in a transaction was correct, however that counter was only used to check the number of buffers in the bd_list_tr, plus an assert at the end of each transaction. With the assert now changed to use the calculated buffer counts, we can remove both bd_list_tr and its associated counter. This should make the code easier to understand as well as shrinking a couple of structures. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r--fs/gfs2/lops.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 7882671bfe09..e9709dabc267 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -396,12 +396,8 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
396 396
397 lock_buffer(bd->bd_bh); 397 lock_buffer(bd->bd_bh);
398 gfs2_log_lock(sdp); 398 gfs2_log_lock(sdp);
399 if (!list_empty(&bd->bd_list_tr))
400 goto out;
401 tr = current->journal_info; 399 tr = current->journal_info;
402 tr->tr_touched = 1; 400 tr->tr_touched = 1;
403 tr->tr_num_buf++;
404 list_add(&bd->bd_list_tr, &tr->tr_list_buf);
405 if (!list_empty(&le->le_list)) 401 if (!list_empty(&le->le_list))
406 goto out; 402 goto out;
407 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); 403 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
@@ -781,18 +777,10 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
781 777
782 lock_buffer(bd->bd_bh); 778 lock_buffer(bd->bd_bh);
783 gfs2_log_lock(sdp); 779 gfs2_log_lock(sdp);
784 if (tr) { 780 if (tr)
785 if (!list_empty(&bd->bd_list_tr))
786 goto out;
787 tr->tr_touched = 1; 781 tr->tr_touched = 1;
788 if (gfs2_is_jdata(ip)) {
789 tr->tr_num_buf++;
790 list_add(&bd->bd_list_tr, &tr->tr_list_buf);
791 }
792 }
793 if (!list_empty(&le->le_list)) 782 if (!list_empty(&le->le_list))
794 goto out; 783 goto out;
795
796 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); 784 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
797 set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); 785 set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
798 if (gfs2_is_jdata(ip)) { 786 if (gfs2_is_jdata(ip)) {