summaryrefslogtreecommitdiffstats
path: root/src/cache_iterators.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-06-25 14:55:18 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-06-25 14:55:18 +0000
commit6575518b416eb625b562fa9f3d35533dfa8c1ca4 (patch)
treec417dc1943143a9ba2dc5fec24460adfcd4a53a9 /src/cache_iterators.c
parent3f3a6701978df8ca16ebb5988eb7a46771deb964 (diff)
fork when internal/external dump and commit requests are received
Diffstat (limited to 'src/cache_iterators.c')
-rw-r--r--src/cache_iterators.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cache_iterators.c b/src/cache_iterators.c
index 7ae25fa..446cac8 100644
--- a/src/cache_iterators.c
+++ b/src/cache_iterators.c
@@ -71,9 +71,8 @@ void cache_dump(struct cache *c, int fd, int type)
.type = type
};
- lock();
+ /* does not require locking: called inside fork() */
hashtable_iterate(c->h, (void *) &tmp, do_dump);
- unlock();
}
static int do_commit(void *data1, void *data2)
@@ -147,9 +146,8 @@ void cache_commit(struct cache *c)
unsigned int commit_exist = c->commit_exist;
unsigned int commit_fail = c->commit_fail;
- lock();
+ /* does not require locking: called inside fork() */
hashtable_iterate(c->h, c, do_commit);
- unlock();
/* calculate new entries committed */
commit_ok = c->commit_ok - commit_ok;