diff options
author | Jan Kara | 2012-03-14 03:45:25 +0100 |
---|---|---|
committer | Theodore Ts'o | 2012-03-14 03:45:25 +0100 |
commit | 932bb305ba2a01cd62809644d569f004e77a4355 (patch) | |
tree | f03c1389c2902285e7e964210729bbbf2505d607 /include/linux | |
parent | jbd2: remove always true condition in __journal_try_to_free_buffer() (diff) | |
download | kernel-qcow2-linux-932bb305ba2a01cd62809644d569f004e77a4355.tar.gz kernel-qcow2-linux-932bb305ba2a01cd62809644d569f004e77a4355.tar.xz kernel-qcow2-linux-932bb305ba2a01cd62809644d569f004e77a4355.zip |
jbd2: remove bh_state lock from checkpointing code
All accesses to checkpointing entries in journal_head are protected
by j_list_lock. Thus __jbd2_journal_remove_checkpoint() doesn't really
need bh_state lock.
Also the only part of journal head that the rest of checkpointing code
needs to check is jh->b_transaction which is safe to read under
j_list_lock.
So we can safely remove bh_state lock from all of checkpointing code which
makes it considerably prettier.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/journal-head.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 423cb6d78ee0..c18b46f8aeeb 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h @@ -66,6 +66,8 @@ struct journal_head { * transaction (if there is one). Only applies to buffers on a * transaction's data or metadata journaling list. * [j_list_lock] [jbd_lock_bh_state()] + * Either of these locks is enough for reading, both are needed for + * changes. */ transaction_t *b_transaction; |