about summary refs log tree commit diff
path: root/nscd/aicache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r--nscd/aicache.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 6f7b038021..2095edf911 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -31,9 +31,6 @@
 
 #include "dbg_log.h"
 #include "nscd.h"
-#ifdef HAVE_SENDFILE
-# include <kernel-features.h>
-#endif
 
 
 typedef enum nss_status (*nss_gethostbyname4_r)
@@ -447,32 +444,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
 	     would unnecessarily let the receiver wait.  */
 	  assert (fd != -1);
 
-#ifdef HAVE_SENDFILE
-	  if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
-	    {
-	      assert (db->wr_fd != -1);
-	      assert ((char *) &dataset->resp > (char *) db->data);
-	      assert ((char *) dataset - (char *) db->head + total
-		      <= (sizeof (struct database_pers_head)
-			  + db->head->module * sizeof (ref_t)
-			  + db->head->data_size));
-# ifndef __ASSUME_SENDFILE
-	      ssize_t written;
-	      written =
-# endif
-		sendfileall (fd, db->wr_fd, (char *) &dataset->resp
-			     - (char *) db->head, dataset->head.recsize);
-# ifndef __ASSUME_SENDFILE
-	      if (written == -1 && errno == ENOSYS)
-		goto use_write;
-# endif
-	    }
-	  else
-# ifndef __ASSUME_SENDFILE
-	  use_write:
-# endif
-#endif
-	    writeall (fd, &dataset->resp, dataset->head.recsize);
+	  writeall (fd, &dataset->resp, dataset->head.recsize);
 	}
 
       goto out;