mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-locking: Remove unused variable lock_num_pending
The number of pending locks displayed in ctdb statistics are stored in ctdb_statistics structure and not ctdb_context. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
3ff8ec0283
commit
3aa96c3a3e
@ -558,7 +558,6 @@ struct ctdb_context {
|
||||
struct trbt_tree *child_processes;
|
||||
|
||||
/* Used for locking record/db/alldb */
|
||||
int lock_num_pending;
|
||||
struct lock_context *lock_current;
|
||||
struct lock_context *lock_pending;
|
||||
};
|
||||
|
@ -284,7 +284,6 @@ static int ctdb_lock_context_destructor(struct lock_context *lock_ctx)
|
||||
}
|
||||
} else {
|
||||
DLIST_REMOVE(lock_ctx->ctdb->lock_pending, lock_ctx);
|
||||
lock_ctx->ctdb->lock_num_pending--;
|
||||
CTDB_DECREMENT_STAT(lock_ctx->ctdb, locks.num_pending);
|
||||
if (lock_ctx->type == LOCK_RECORD || lock_ctx->type == LOCK_DB) {
|
||||
CTDB_DECREMENT_DB_STAT(lock_ctx->ctdb_db, locks.num_pending);
|
||||
@ -689,7 +688,6 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
|
||||
if (! lock_ctx->request) {
|
||||
DEBUG(DEBUG_INFO, ("Removing lock context without lock request\n"));
|
||||
DLIST_REMOVE(ctdb->lock_pending, lock_ctx);
|
||||
ctdb->lock_num_pending--;
|
||||
CTDB_DECREMENT_STAT(ctdb, locks.num_pending);
|
||||
if (lock_ctx->ctdb_db) {
|
||||
CTDB_DECREMENT_DB_STAT(lock_ctx->ctdb_db, locks.num_pending);
|
||||
@ -799,7 +797,6 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
|
||||
|
||||
/* Move the context from pending to current */
|
||||
DLIST_REMOVE(ctdb->lock_pending, lock_ctx);
|
||||
ctdb->lock_num_pending--;
|
||||
DLIST_ADD_END(ctdb->lock_current, lock_ctx, NULL);
|
||||
if (lock_ctx->ctdb_db) {
|
||||
lock_ctx->ctdb_db->lock_num_current++;
|
||||
@ -862,7 +859,6 @@ static struct lock_request *ctdb_lock_internal(struct ctdb_context *ctdb,
|
||||
lock_ctx->child = -1;
|
||||
|
||||
DLIST_ADD_END(ctdb->lock_pending, lock_ctx, NULL);
|
||||
ctdb->lock_num_pending++;
|
||||
CTDB_INCREMENT_STAT(ctdb, locks.num_pending);
|
||||
if (ctdb_db) {
|
||||
CTDB_INCREMENT_DB_STAT(ctdb_db, locks.num_pending);
|
||||
|
Loading…
Reference in New Issue
Block a user