diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
commit | bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7 (patch) | |
tree | 4edbacab40c67bb5d9d6bebe66a22949349cbf9a /source3/modules/vfs_readahead.c | |
parent | 8dbeca6e9d06d573adebe8d9c5114b24d8782e43 (diff) | |
parent | 62c91987d902d4dfe27023ff2ec2fb73e602105b (diff) | |
download | samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.gz samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.bz2 samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit ea36c3add588061cf338deabb2d8952f2213a8bd)
Diffstat (limited to 'source3/modules/vfs_readahead.c')
-rw-r--r-- | source3/modules/vfs_readahead.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c index 8fdd6168fe..b3642d558f 100644 --- a/source3/modules/vfs_readahead.c +++ b/source3/modules/vfs_readahead.c @@ -80,7 +80,6 @@ static ssize_t readahead_sendfile(struct vfs_handle_struct *handle, static ssize_t readahead_pread(vfs_handle_struct *handle, files_struct *fsp, - int fd, void *data, size_t count, SMB_OFF_T offset) @@ -89,16 +88,16 @@ static ssize_t readahead_pread(vfs_handle_struct *handle, if ( offset % rhd->off_bound == 0) { #if defined(HAVE_LINUX_READAHEAD) - int err = readahead(fd, offset, (size_t)rhd->len); + int err = readahead(fsp->fh->fd, offset, (size_t)rhd->len); DEBUG(10,("readahead_pread: readahead on fd %u, offset %llu, len %u returned %d\n", - (unsigned int)fd, + (unsigned int)fsp->fh->fd, (unsigned long long)offset, (unsigned int)rhd->len, err )); #elif defined(HAVE_POSIX_FADVISE) - int err = posix_fadvise(fd, offset, (off_t)rhd->len, POSIX_FADV_WILLNEED); + int err = posix_fadvise(fsp->fh->fd, offset, (off_t)rhd->len, POSIX_FADV_WILLNEED); DEBUG(10,("readahead_pread: posix_fadvise on fd %u, offset %llu, len %u returned %d\n", - (unsigned int)fd, + (unsigned int)fsp->fh->fd, (unsigned long long)offset, (unsigned int)rhd->len, err )); @@ -109,7 +108,7 @@ static ssize_t readahead_pread(vfs_handle_struct *handle, } #endif } - return SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, count, offset); + return SMB_VFS_NEXT_PREAD(handle, fsp, data, count, offset); } /******************************************************************* |