]> granicus.if.org Git - transmission/commitdiff
(2.7x) backport r13803 for bug #5102
authorJordan Lee <jordan@transmissionbt.com>
Fri, 1 Feb 2013 18:54:39 +0000 (18:54 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 1 Feb 2013 18:54:39 +0000 (18:54 +0000)
libtransmission/fdlimit.c

index 2322dd7980ce915ec7e81d1804cfca4751b6a1b7..4bd9d5276ac1327acf05a433705ce93d2fb6535b 100644 (file)
@@ -288,18 +288,6 @@ tr_open_file_for_scanning (const char * filename)
 void
 tr_close_file (int fd)
 {
-#if defined (HAVE_POSIX_FADVISE)
-    /* Set hint about not caching this file.
-       It's okay for this to fail silently, so don't let it affect errno */
-    const int err = errno;
-    posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED);
-    errno = err;
-#endif
-#ifdef SYS_DARWIN
-    /* it's unclear to me from the man pages if this actually flushes out the cache,
-     * but it couldn't hurt... */
-    fcntl (fd, F_NOCACHE, 1);
-#endif
     close (fd);
 }