]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: if we've already started a trans handle, use that one
authorJosef Bacik <josef@redhat.com>
Wed, 13 Apr 2011 19:15:59 +0000 (15:15 -0400)
committerJosef Bacik <josef@redhat.com>
Mon, 23 May 2011 17:00:57 +0000 (13:00 -0400)
commit214f6032ef683f8c340008dab70e07b7d6a5f683
tree892b123c194e490a2dc0bc5b45f641ac921e9d26
parent8a1ebdaad2e9aa096bd5a9ecebd2b1fa411a0377
Btrfs: if we've already started a trans handle, use that one

We currently track trans handles in current->journal_info, but we don't actually
use it.  This patch fixes it.  This will cover the case where we have multiple
people starting transactions down the call chain.  This keeps us from having to
allocate a new handle and all of that, we just increase the use count of the
current handle, save the old block_rsv, and return.  I tested this with xfstests
and it worked out fine.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/transaction.c
fs/btrfs/transaction.h