summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_readahead.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-11 00:51:19 +0100
committerMichael Adam <obnox@samba.org>2008-01-11 01:27:05 +0100
commit4caab9ca25e1163378714de825d835e79e27dd4f (patch)
tree9a7b06f3756a9f4c0ae45c13dbad7d13929a7e5f /source3/modules/vfs_readahead.c
parent13785d5c62093540139094f6dfcf808100790939 (diff)
downloadsamba-4caab9ca25e1163378714de825d835e79e27dd4f.tar.gz
samba-4caab9ca25e1163378714de825d835e79e27dd4f.tar.xz
samba-4caab9ca25e1163378714de825d835e79e27dd4f.zip
Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().
Michael (This used to be commit a52cfb7d777157c93c9dc26c67f457be592dd537)
Diffstat (limited to 'source3/modules/vfs_readahead.c')
-rw-r--r--source3/modules/vfs_readahead.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c
index b3642d558fe..df75814b724 100644
--- a/source3/modules/vfs_readahead.c
+++ b/source3/modules/vfs_readahead.c
@@ -35,8 +35,7 @@ struct readahead_data {
static ssize_t readahead_sendfile(struct vfs_handle_struct *handle,
int tofd,
- files_struct *fsp,
- int fromfd,
+ files_struct *fromfsp,
const DATA_BLOB *header,
SMB_OFF_T offset,
size_t count)
@@ -45,16 +44,16 @@ static ssize_t readahead_sendfile(struct vfs_handle_struct *handle,
if ( offset % rhd->off_bound == 0) {
#if defined(HAVE_LINUX_READAHEAD)
- int err = readahead(fromfd, offset, (size_t)rhd->len);
+ int err = readahead(fromfsp->fh->fd, offset, (size_t)rhd->len);
DEBUG(10,("readahead_sendfile: readahead on fd %u, offset %llu, len %u returned %d\n",
- (unsigned int)fromfd,
+ (unsigned int)fromfsp->fh->fd,
(unsigned long long)offset,
(unsigned int)rhd->len,
err ));
#elif defined(HAVE_POSIX_FADVISE)
- int err = posix_fadvise(fromfd, offset, (off_t)rhd->len, POSIX_FADV_WILLNEED);
+ int err = posix_fadvise(fromfsp->fh->fd, offset, (off_t)rhd->len, POSIX_FADV_WILLNEED);
DEBUG(10,("readahead_sendfile: posix_fadvise on fd %u, offset %llu, len %u returned %d\n",
- (unsigned int)fromfd,
+ (unsigned int)fromfsp->fh->fd,
(unsigned long long)offset,
(unsigned int)rhd->len,
err ));
@@ -67,8 +66,7 @@ static ssize_t readahead_sendfile(struct vfs_handle_struct *handle,
}
return SMB_VFS_NEXT_SENDFILE(handle,
tofd,
- fsp,
- fromfd,
+ fromfsp,
header,
offset,
count);