Skip to content

Commit

Permalink
[PATCH] jbd: add lock annotation to jbd_sync_bh
Browse files Browse the repository at this point in the history
jbd_sync_bh releases journal->j_list_lock.  Add a lock annotation to this
function so that sparse can check callers for lock pairing, and so that
sparse will not complain about this function since it intentionally uses
the lock in this manner.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Josh Triplett authored and Linus Torvalds committed Sep 27, 2006
1 parent bbf2bef commit e7ab8d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/jbd/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void __log_wait_for_space(journal_t *journal)
* jbd_unlock_bh_state().
*/
static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh)
__releases(journal->j_list_lock)
{
get_bh(bh);
spin_unlock(&journal->j_list_lock);
Expand Down

0 comments on commit e7ab8d6

Please sign in to comment.