]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #4946]
authorUlrich Drepper <drepper@redhat.com>
Wed, 22 Aug 2007 03:40:34 +0000 (03:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 22 Aug 2007 03:40:34 +0000 (03:40 +0000)
* nscd/connections.c (handle_request): Using sendfile always
requires that mmap is used for the database.
Patch by Petr Baudis <pasky@suse.cz>.

ChangeLog
nscd/connections.c

index 847b80aa5fc7193be3a54333f6dcea47dba23da7..e42f82e5d37a4aa052aabc9d285d19b08b026321 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #4946]
+       * nscd/connections.c (handle_request): Using sendfile always
+       requires that mmap is used for the database.
+       Patch by Petr Baudis <pasky@suse.cz>.
+
        [BZ #4905]
        * nscd/hstcache.c (cache_addhst): When reloading an entry which
        suddenly has two or more addresses, ignore it and remove the old
index 20b676e12addf4f235222f86b295207ff59c48a4..e435fa8b27ecd3c18e474ab714fd390aa5cc9d18 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);