aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd')
-rw-r--r--fs/jbd/commit.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index 8e08efcaede2..a38c7186c570 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -104,7 +104,8 @@ static int journal_write_commit_record(journal_t *journal,
104{ 104{
105 struct journal_head *descriptor; 105 struct journal_head *descriptor;
106 struct buffer_head *bh; 106 struct buffer_head *bh;
107 int i, ret; 107 journal_header_t *header;
108 int ret;
108 int barrier_done = 0; 109 int barrier_done = 0;
109 110
110 if (is_journal_aborted(journal)) 111 if (is_journal_aborted(journal))
@@ -116,13 +117,10 @@ static int journal_write_commit_record(journal_t *journal,
116 117
117 bh = jh2bh(descriptor); 118 bh = jh2bh(descriptor);
118 119
119 /* AKPM: buglet - add `i' to tmp! */ 120 header = (journal_header_t *)(bh->b_data);
120 for (i = 0; i < bh->b_size; i += 512) { 121 header->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
121 journal_header_t *tmp = (journal_header_t*)bh->b_data; 122 header->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
122 tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); 123 header->h_sequence = cpu_to_be32(commit_transaction->t_tid);
123 tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
124 tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
125 }
126 124
127 JBUFFER_TRACE(descriptor, "write commit block"); 125 JBUFFER_TRACE(descriptor, "write commit block");
128 set_buffer_dirty(bh); 126 set_buffer_dirty(bh);