Bug 880435: Fixed Linux OS_READAHEAD implementation in nsLocalFile. r=glandium

This commit is contained in:
Aaron Klotz 2013-06-19 17:57:24 -06:00
parent b4254de571
commit 2e902b0646

View File

@ -401,7 +401,8 @@ nsLocalFile::OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval)
#if defined(LINUX) && !defined(ANDROID)
if (flags & OS_READAHEAD) {
readahead(PR_FileDesc2NativeHandle(*_retval), 0, 0);
posix_fadvise(PR_FileDesc2NativeHandle(*_retval), 0, 0,
POSIX_FADV_SEQUENTIAL);
}
#endif
return NS_OK;