summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_cacheprime.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_cacheprime.c')
-rw-r--r--source3/modules/vfs_cacheprime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index 4ac78437c3..5675108f1e 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -142,16 +142,15 @@ static ssize_t cprime_sendfile(
static ssize_t cprime_read(
vfs_handle_struct * handle,
files_struct * fsp,
- int fd,
void * data,
size_t count)
{
SMB_OFF_T offset;
- offset = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
+ offset = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
if (offset >= 0 && g_readbuf) {
- prime_cache(handle, fsp, fd, offset, count);
- SMB_VFS_LSEEK(fsp, fd, offset, SEEK_SET);
+ prime_cache(handle, fsp, fsp->fh->fd, offset, count);
+ SMB_VFS_LSEEK(fsp, offset, SEEK_SET);
}
return SMB_VFS_NEXT_READ(handle, fsp, data, count);