summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-04-08 14:38:49 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2015-04-25 12:46:08 +1000
commit1a32cfeaf36c7d851ccbe2ec5244bf45f17092d8 (patch)
tree700b3427c3c31727e1579f5edb05ca7d26de6485
parent4f3da019e893b18ec392025845dd5b839c820893 (diff)
downloadmongo-1a32cfeaf36c7d851ccbe2ec5244bf45f17092d8.tar.gz
Fix places where we were using the wrong link for traversing hash buckets.
-rw-r--r--src/conn/conn_dhandle.c2
-rw-r--r--src/os_posix/os_open.c4
-rw-r--r--src/os_posix/os_remove.c2
-rw-r--r--src/os_win/os_open.c4
-rw-r--r--src/os_win/os_remove.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/conn/conn_dhandle.c b/src/conn/conn_dhandle.c
index 63180d64019..385280116a6 100644
--- a/src/conn/conn_dhandle.c
+++ b/src/conn/conn_dhandle.c
@@ -649,7 +649,7 @@ __wt_conn_dhandle_close_all(
WT_ASSERT(session, session->dhandle == NULL);
bucket = __wt_hash_city64(name, strlen(name)) % WT_HASH_ARRAY_SIZE;
- SLIST_FOREACH(dhandle, &conn->dhhash[bucket], l) {
+ SLIST_FOREACH(dhandle, &conn->dhhash[bucket], hashl) {
if (strcmp(dhandle->name, name) != 0)
continue;
diff --git a/src/os_posix/os_open.c b/src/os_posix/os_open.c
index 652d6c57803..18804183c84 100644
--- a/src/os_posix/os_open.c
+++ b/src/os_posix/os_open.c
@@ -60,7 +60,7 @@ __wt_open(WT_SESSION_IMPL *session,
hash = __wt_hash_city64(name, strlen(name));
bucket = hash % WT_HASH_ARRAY_SIZE;
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(tfh, &conn->fhhash[bucket], l) {
+ SLIST_FOREACH(tfh, &conn->fhhash[bucket], hashl) {
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
@@ -174,7 +174,7 @@ setupfh:
*/
matched = 0;
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(tfh, &conn->fhhash[bucket], l) {
+ SLIST_FOREACH(tfh, &conn->fhhash[bucket], hashl) {
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
diff --git a/src/os_posix/os_remove.c b/src/os_posix/os_remove.c
index d1f658b7ae1..3fc692d8755 100644
--- a/src/os_posix/os_remove.c
+++ b/src/os_posix/os_remove.c
@@ -29,7 +29,7 @@ __remove_file_check(WT_SESSION_IMPL *session, const char *name)
* level should have closed it before removing.
*/
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(fh, &conn->fhhash[bucket], l)
+ SLIST_FOREACH(fh, &conn->fhhash[bucket], hashl)
if (strcmp(name, fh->name) == 0)
break;
__wt_spin_unlock(session, &conn->fh_lock);
diff --git a/src/os_win/os_open.c b/src/os_win/os_open.c
index cfc8e319da0..74b74604836 100644
--- a/src/os_win/os_open.c
+++ b/src/os_win/os_open.c
@@ -39,7 +39,7 @@ __wt_open(WT_SESSION_IMPL *session,
/* Increment the reference count if we already have the file open. */
matched = 0;
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(tfh, &conn->fhhash[bucket], l)
+ SLIST_FOREACH(tfh, &conn->fhhash[bucket], hashl)
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
@@ -160,7 +160,7 @@ setupfh:
*/
matched = 0;
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(tfh, &conn->fhhash[bucket], l)
+ SLIST_FOREACH(tfh, &conn->fhhash[bucket], hashl)
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
diff --git a/src/os_win/os_remove.c b/src/os_win/os_remove.c
index 45b4d5ce6b0..0c6396c775f 100644
--- a/src/os_win/os_remove.c
+++ b/src/os_win/os_remove.c
@@ -29,7 +29,7 @@ __remove_file_check(WT_SESSION_IMPL *session, const char *name)
* level should have closed it before removing.
*/
__wt_spin_lock(session, &conn->fh_lock);
- SLIST_FOREACH(fh, &conn->fhhash[bucket], l)
+ SLIST_FOREACH(fh, &conn->fhhash[bucket], hashl)
if (strcmp(name, fh->name) == 0)
break;
__wt_spin_unlock(session, &conn->fh_lock);