summaryrefslogtreecommitdiff
path: root/nscd/cache.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-08 21:34:25 +0000
committerJakub Jelinek <jakub@redhat.com>2005-08-08 21:34:25 +0000
commita6d1003497d92df2575894474fa1d2c0ee3f39f4 (patch)
tree6665a936728da87053845bdff9ff812ee58981ec /nscd/cache.c
parentc633e822b473e8135a36e413c5b79d7ce5a5d1fc (diff)
Updated to fedora-glibc-20050808T2126
Diffstat (limited to 'nscd/cache.c')
-rw-r--r--nscd/cache.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nscd/cache.c b/nscd/cache.c
index efac4b3bcc..800b7ecf27 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -169,6 +169,12 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
if (nentries > table->head->maxnentries)
table->head->maxnentries = nentries;
+ if (table->persistent)
+ // XXX async OK?
+ msync ((void *) table->head,
+ (char *) &table->head->array[hash] - (char *) table->head
+ + sizeof (ref_t), MS_ASYNC);
+
return 0;
}