(handle_request): Using sendfile always requires that mmap is used for
authordrepper <drepper>
Wed, 22 Aug 2007 03:39:59 +0000 (03:39 +0000)
committerdrepper <drepper>
Wed, 22 Aug 2007 03:39:59 +0000 (03:39 +0000)
the database.

nscd/connections.c

index 20b676e..e435fa8 100644 (file)
@@ -1016,7 +1016,7 @@ cannot handle old request version %d; current version is %d"),
          ssize_t nwritten;
 
 #ifdef HAVE_SENDFILE
-         if (db->mmap_used || !cached->notfound)
+         if (__builtin_expect (db->mmap_used, 1))
            {
              assert (db->wr_fd != -1);
              assert ((char *) cached->data > (char *) db->data);