diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-08-13 10:11:04 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-08-13 10:11:04 -0400 |
commit | 2720c71a28a194c375ebb2cb8a82f3102aca410f (patch) | |
tree | 13a8a2638d8535b9a900d8b4bb93a3b3692c5dd2 /src/lsm | |
parent | 05721dd96dda0b6658e2c7484dc0f81e7b7847a3 (diff) | |
parent | f12c69449d832488b8079aff9d1f4459dd34649d (diff) | |
download | mongo-2720c71a28a194c375ebb2cb8a82f3102aca410f.tar.gz |
Merge branch 'develop' into wt-2025-inline-atomic-functions
Diffstat (limited to 'src/lsm')
-rw-r--r-- | src/lsm/lsm_manager.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lsm/lsm_manager.c b/src/lsm/lsm_manager.c index 48a32d389e0..bf28e28804c 100644 --- a/src/lsm/lsm_manager.c +++ b/src/lsm/lsm_manager.c @@ -273,7 +273,7 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session) WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_LSM_MANAGER *manager; - WT_LSM_WORK_UNIT *current, *next; + WT_LSM_WORK_UNIT *current; WT_SESSION *wt_session; uint32_t i; uint64_t removed; @@ -297,23 +297,17 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session) manager->lsm_worker_cookies[0].tid = 0; /* Release memory from any operations left on the queue. */ - for (current = TAILQ_FIRST(&manager->switchqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->switchqh)) != NULL) { TAILQ_REMOVE(&manager->switchqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); } - for (current = TAILQ_FIRST(&manager->appqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->appqh)) != NULL) { TAILQ_REMOVE(&manager->appqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); } - for (current = TAILQ_FIRST(&manager->managerqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->managerqh)) != NULL) { TAILQ_REMOVE(&manager->managerqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); |