nilfs2: fix lockdep recursive locking warning on bmap
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Thu, 26 Mar 2009 17:51:39 +0000 (02:51 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 13 Apr 2009 00:53:49 +0000 (09:53 +0900)
commitbcb48891b05b4179edc86298d3dccb2ce90d5413
treec7cd9e37ca46e4f7241be2faa5f5c6e7625d7520
parentc306af23e19d3c94c9229263c39fe487e915e774
nilfs2: fix lockdep recursive locking warning on bmap

The bmap semaphore of DAT file can be held while a bmap of other files
is locked.  This has caused the following false detection of lockdep
check:

mount.nilfs2/4667 is trying to acquire lock:
 (&bmap->b_sem){..--}, at: [<d0c6c4b4>] nilfs_bmap_lookup_at_level+0x1a/0x74 [nilfs2]

but task is already holding lock:
 (&bmap->b_sem){..--}, at: [<d0c6c4b4>] nilfs_bmap_lookup_at_level+0x1a/0x74 [nilfs2]

This will fix the false detection by distinguishing semaphores of the
DAT and other files.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/bmap.c