1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

Remove now redundant parameter fd from prime_cache().

Michael
This commit is contained in:
Michael Adam 2008-01-11 00:56:06 +01:00
parent a52cfb7d77
commit 63acaf1b97

View File

@ -48,7 +48,6 @@ static void * g_readbuf = NULL;
static bool prime_cache(
struct vfs_handle_struct * handle,
files_struct * fsp,
int fd,
SMB_OFF_T offset,
size_t count)
{
@ -75,7 +74,7 @@ static bool prime_cache(
MODULE, (long long)g_readsz, (long long)*last,
fsp->fsp_name));
nread = sys_pread(fd, g_readbuf, g_readsz, *last);
nread = sys_pread(fsp->fh->fd, g_readbuf, g_readsz, *last);
if (nread < 0) {
*last = -1;
return False;
@ -131,7 +130,7 @@ static ssize_t cprime_sendfile(
size_t count)
{
if (g_readbuf && offset == 0) {
prime_cache(handle, fromfsp, fromfsp->fh->fd, offset, count);
prime_cache(handle, fromfsp, offset, count);
}
return SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp,
@ -148,7 +147,7 @@ static ssize_t cprime_read(
offset = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
if (offset >= 0 && g_readbuf) {
prime_cache(handle, fsp, fsp->fh->fd, offset, count);
prime_cache(handle, fsp, offset, count);
SMB_VFS_LSEEK(fsp, offset, SEEK_SET);
}
@ -163,7 +162,7 @@ static ssize_t cprime_pread(
SMB_OFF_T offset)
{
if (g_readbuf) {
prime_cache(handle, fsp, fsp->fh->fd, offset, count);
prime_cache(handle, fsp, offset, count);
}
return SMB_VFS_NEXT_PREAD(handle, fsp, data, count, offset);