diff options
author | Sage Weil <sage@newdream.net> | 2008-12-02 06:36:10 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-02 06:36:10 -0500 |
commit | 6e3ad88729103c4d19703311253fab8a49669fa8 (patch) | |
tree | 4dfbc656de0b8956fd90226b5a03d35c076b9d34 | |
parent | 641f5219f2ea0dfd1c024c91021ddc83f50bf1ce (diff) |
Btrfs: remove unneeded total_trans
Remove unneeded debugging sanity check. It gets corrupted anyway when
multiple btrfs file systems are mounted, throwing bad warnings along the
way.
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/btrfs/transaction.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c2c3b4281962..c38f6a0e30b1 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "ref-cache.h" | 28 | #include "ref-cache.h" |
29 | #include "tree-log.h" | 29 | #include "tree-log.h" |
30 | 30 | ||
31 | static int total_trans = 0; | ||
32 | extern struct kmem_cache *btrfs_trans_handle_cachep; | 31 | extern struct kmem_cache *btrfs_trans_handle_cachep; |
33 | extern struct kmem_cache *btrfs_transaction_cachep; | 32 | extern struct kmem_cache *btrfs_transaction_cachep; |
34 | 33 | ||
@@ -39,8 +38,6 @@ static noinline void put_transaction(struct btrfs_transaction *transaction) | |||
39 | WARN_ON(transaction->use_count == 0); | 38 | WARN_ON(transaction->use_count == 0); |
40 | transaction->use_count--; | 39 | transaction->use_count--; |
41 | if (transaction->use_count == 0) { | 40 | if (transaction->use_count == 0) { |
42 | WARN_ON(total_trans == 0); | ||
43 | total_trans--; | ||
44 | list_del_init(&transaction->list); | 41 | list_del_init(&transaction->list); |
45 | memset(transaction, 0, sizeof(*transaction)); | 42 | memset(transaction, 0, sizeof(*transaction)); |
46 | kmem_cache_free(btrfs_transaction_cachep, transaction); | 43 | kmem_cache_free(btrfs_transaction_cachep, transaction); |
@@ -57,7 +54,6 @@ static noinline int join_transaction(struct btrfs_root *root) | |||
57 | if (!cur_trans) { | 54 | if (!cur_trans) { |
58 | cur_trans = kmem_cache_alloc(btrfs_transaction_cachep, | 55 | cur_trans = kmem_cache_alloc(btrfs_transaction_cachep, |
59 | GFP_NOFS); | 56 | GFP_NOFS); |
60 | total_trans++; | ||
61 | BUG_ON(!cur_trans); | 57 | BUG_ON(!cur_trans); |
62 | root->fs_info->generation++; | 58 | root->fs_info->generation++; |
63 | root->fs_info->last_alloc = 0; | 59 | root->fs_info->last_alloc = 0; |