diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-02-11 18:23:47 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-02-11 18:23:47 -0500 |
commit | 922d15b5f006ab6b9a482a4e83d52eb5a29ca889 (patch) | |
tree | 7509e5345d9c59fae9fce32f255a0d104c5d0c80 /src | |
parent | 16334e4fa43869c9553b5ea9d7c1720b1ded0c5d (diff) | |
download | mongo-922d15b5f006ab6b9a482a4e83d52eb5a29ca889.tar.gz |
CID 47315: At condition locked, the value of locked must be equal to 1.
There's no point to a locked variable in __split_parent(), we lock the
first thing we do, there's never an exit without an unlock.
Diffstat (limited to 'src')
-rw-r--r-- | src/btree/bt_split.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c index a7dfdf8d998..6ebd4609efa 100644 --- a/src/btree/bt_split.c +++ b/src/btree/bt_split.c @@ -799,12 +799,12 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref, WT_REF **ref_new, uint64_t split_gen; uint32_t children, i, j; uint32_t deleted_entries, parent_entries, result_entries; - int complete, hazard, locked; + int complete, hazard; parent = NULL; /* -Wconditional-uninitialized */ alloc_index = pindex = NULL; parent_ref = NULL; - complete = hazard = locked = 0; + complete = hazard = 0; parent_entries = 0; /* @@ -830,7 +830,6 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref, WT_REF **ref_new, } __wt_yield(); } - locked = 1; /* * We have exclusive access to split the parent, and at this point, the @@ -1044,8 +1043,7 @@ err: if (!complete) if (next_ref->state == WT_REF_SPLIT) next_ref->state = WT_REF_DELETED; } - if (locked) - F_CLR_ATOMIC(parent, WT_PAGE_SPLITTING); + F_CLR_ATOMIC(parent, WT_PAGE_SPLITTING); if (hazard) WT_TRET(__wt_hazard_clear(session, parent)); |