diff options
Diffstat (limited to 'nscd/nscd_getpw_r.c')
-rw-r--r-- | nscd/nscd_getpw_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c index 20986f4..82fdd17 100644 --- a/nscd/nscd_getpw_r.c +++ b/nscd/nscd_getpw_r.c @@ -225,7 +225,7 @@ nscd_getpw_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; } |