diff options
author | Jan Kara <jack@suse.cz> | 2016-02-22 23:17:15 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-02-22 23:17:15 -0500 |
commit | 32ab671599a89534f37e97d146c27690e371b661 (patch) | |
tree | 6fe66460f49b278a6c7115fe2d3d03733c91bc2f /fs/jbd2/revoke.c | |
parent | 9bcf976cb8b86eb40e0c0b495a14e4cb967b9c6e (diff) | |
download | linux-32ab671599a89534f37e97d146c27690e371b661.tar.gz linux-32ab671599a89534f37e97d146c27690e371b661.tar.bz2 linux-32ab671599a89534f37e97d146c27690e371b661.zip |
jbd2: factor out common descriptor block initialization
Descriptor block header is initialized in several places. Factor out the
common code into jbd2_journal_get_descriptor_buffer().
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/revoke.c')
-rw-r--r-- | fs/jbd2/revoke.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index c839332be56b..d1ebb1d41d17 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c @@ -570,7 +570,6 @@ static void write_one_revoke_record(transaction_t *transaction, int csum_size = 0; struct buffer_head *descriptor; int sz, offset; - journal_header_t *header; /* If we are already aborting, this all becomes a noop. We still need to go round the loop in @@ -600,13 +599,10 @@ static void write_one_revoke_record(transaction_t *transaction, } if (!descriptor) { - descriptor = jbd2_journal_get_descriptor_buffer(journal); + descriptor = jbd2_journal_get_descriptor_buffer(transaction, + JBD2_REVOKE_BLOCK); if (!descriptor) return; - header = (journal_header_t *)descriptor->b_data; - header->h_magic = cpu_to_be32(JBD2_MAGIC_NUMBER); - header->h_blocktype = cpu_to_be32(JBD2_REVOKE_BLOCK); - header->h_sequence = cpu_to_be32(transaction->t_tid); /* Record it so that we can wait for IO completion later */ BUFFER_TRACE(descriptor, "file in log_bufs"); |