Btrfs: pass lockdep rwsem metadata to async commit transaction
authorSage Weil <sage@inktank.com>
Thu, 30 Aug 2012 22:26:15 +0000 (16:26 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:07 +0000 (15:19 -0400)
commit6fc4e3548598d10a5e947797a09cbc1b257a22ab
treead7e5727ef08cebffa0bc1c36af05c363f851218
parent2aaa66558172b017f36bf38ae69372813dedee9d
Btrfs: pass lockdep rwsem metadata to async commit transaction

The freeze rwsem is taken by sb_start_intwrite() and dropped during the
commit_ or end_transaction().  In the async case, that happens in a worker
thread.  Tell lockdep the calling thread is releasing ownership of the
rwsem and the async thread is picking it up.

XFS plays the same trick in fs/xfs/xfs_aops.c.

Signed-off-by: Sage Weil <sage@inktank.com>
fs/btrfs/transaction.c