jbd2: remove bh_state lock from checkpointing code
commit932bb305ba2a01cd62809644d569f004e77a4355
authorJan Kara <jack@suse.cz>
Wed, 14 Mar 2012 02:45:25 +0000 (13 22:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 Mar 2012 02:45:25 +0000 (13 22:45 -0400)
treef03c1389c2902285e7e964210729bbbf2505d607
parentc254c9ec14d5c418c8f36ea7573edae2470a1dc1
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>
fs/jbd2/checkpoint.c
include/linux/journal-head.h