diff options
Diffstat (limited to 'nscd/nscd_gethst_r.c')
-rw-r--r-- | nscd/nscd_gethst_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index 9becb62033..31d13580a1 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -440,7 +440,7 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type, if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - if (atomic_decrement_val (&mapped->counter) == 0) + if (atomic_fetch_add_relaxed (&mapped->counter, -1) == 1) __nscd_unmap (mapped); mapped = NO_MAPPING; } |