]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix block_rsv and space_info lock ordering
authorStefan Behrens <sbehrens@giantdisaster.de>
Fri, 27 Apr 2012 16:41:46 +0000 (12:41 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 27 Apr 2012 17:55:14 +0000 (13:55 -0400)
commitc31f1359ff1b87d49af60b8cb7e1efe22c34ac17
tree9ba8e3c95cc044461eab17dfba50515535ca2a25
parent22de7096c3777f85ed33a8baa54fabe576eb5304
Btrfs: fix block_rsv and space_info lock ordering

may_commit_transaction() calls
        spin_lock(&space_info->lock);
        spin_lock(&delayed_rsv->lock);
and update_global_block_rsv() calls
        spin_lock(&block_rsv->lock);
        spin_lock(&sinfo->lock);

Lockdep complains about this at run time.
Everywhere except in update_global_block_rsv(), the space_info lock is
the outer lock, therefore the locking order in update_global_block_rsv()
is changed.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c