浏览代码

[PATCH] jbd: add lock annotation to jbd_sync_bh

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>
Josh Triplett 18 年之前
父节点
当前提交
e7ab8d6505
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/jbd/checkpoint.c

+ 1 - 0
fs/jbd/checkpoint.c

@@ -145,6 +145,7 @@ void __log_wait_for_space(journal_t *journal)
  * jbd_unlock_bh_state().
  * jbd_unlock_bh_state().
  */
  */
 static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh)
 static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh)
+	__releases(journal->j_list_lock)
 {
 {
 	get_bh(bh);
 	get_bh(bh);
 	spin_unlock(&journal->j_list_lock);
 	spin_unlock(&journal->j_list_lock);