kill-the-bkl/reiserfs: fix "reiserfs lock" / "inode mutex" lock inversion dependency
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 25 Aug 2009 00:24:45 +0000 (02:24 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 14 Sep 2009 05:18:26 +0000 (07:18 +0200)
commitae635c0bbd6c10aa62bf5149c6f41add59fbf4d2
treea8f3ed7ca8452fba1cb153bdb0e2ec98ea5219e1
parent08f14fc8963e585e65b71212ce8050607b9b6c36
kill-the-bkl/reiserfs: fix "reiserfs lock" / "inode mutex" lock inversion dependency

reiserfs_xattr_init is called with the reiserfs write lock held, but
if the ".reiserfs_priv" entry is not created, we take the superblock
root directory inode mutex until .reiserfs_priv is created.

This creates a lock dependency inversion against other sites such as
reiserfs_file_release() which takes an inode mutex and the reiserfs
lock after.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Laurent Riffard <laurent.riffard@free.fr>
fs/reiserfs/xattr.c