Commit 6e3ad887 authored by Sage Weil's avatar Sage Weil Committed by Chris Mason

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: default avatarSage Weil <sage@newdream.net>
parent 641f5219
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "ref-cache.h" #include "ref-cache.h"
#include "tree-log.h" #include "tree-log.h"
static int total_trans = 0;
extern struct kmem_cache *btrfs_trans_handle_cachep; extern struct kmem_cache *btrfs_trans_handle_cachep;
extern struct kmem_cache *btrfs_transaction_cachep; extern struct kmem_cache *btrfs_transaction_cachep;
...@@ -39,8 +38,6 @@ static noinline void put_transaction(struct btrfs_transaction *transaction) ...@@ -39,8 +38,6 @@ static noinline void put_transaction(struct btrfs_transaction *transaction)
WARN_ON(transaction->use_count == 0); WARN_ON(transaction->use_count == 0);
transaction->use_count--; transaction->use_count--;
if (transaction->use_count == 0) { if (transaction->use_count == 0) {
WARN_ON(total_trans == 0);
total_trans--;
list_del_init(&transaction->list); list_del_init(&transaction->list);
memset(transaction, 0, sizeof(*transaction)); memset(transaction, 0, sizeof(*transaction));
kmem_cache_free(btrfs_transaction_cachep, transaction); kmem_cache_free(btrfs_transaction_cachep, transaction);
...@@ -57,7 +54,6 @@ static noinline int join_transaction(struct btrfs_root *root) ...@@ -57,7 +54,6 @@ static noinline int join_transaction(struct btrfs_root *root)
if (!cur_trans) { if (!cur_trans) {
cur_trans = kmem_cache_alloc(btrfs_transaction_cachep, cur_trans = kmem_cache_alloc(btrfs_transaction_cachep,
GFP_NOFS); GFP_NOFS);
total_trans++;
BUG_ON(!cur_trans); BUG_ON(!cur_trans);
root->fs_info->generation++; root->fs_info->generation++;
root->fs_info->last_alloc = 0; root->fs_info->last_alloc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment