From 4caab9ca25e1163378714de825d835e79e27dd4f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Jan 2008 00:51:19 +0100 Subject: Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE(). Michael (This used to be commit a52cfb7d777157c93c9dc26c67f457be592dd537) --- source3/modules/vfs_cacheprime.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/modules/vfs_cacheprime.c') diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c index 5675108f1e..15c8167a07 100644 --- a/source3/modules/vfs_cacheprime.c +++ b/source3/modules/vfs_cacheprime.c @@ -125,17 +125,16 @@ static int cprime_connect( static ssize_t cprime_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) { if (g_readbuf && offset == 0) { - prime_cache(handle, fsp, fromfd, offset, count); + prime_cache(handle, fromfsp, fromfsp->fh->fd, offset, count); } - return SMB_VFS_NEXT_SENDFILE(handle, tofd, fsp, fromfd, + return SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, header, offset, count); } -- cgit From 14d45bedfa844dfbf646e792d1cf84544997de25 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Jan 2008 00:56:06 +0100 Subject: Remove now redundant parameter fd from prime_cache(). Michael (This used to be commit 63acaf1b9755cd5be5342929e1210afa06e170f3) --- source3/modules/vfs_cacheprime.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/modules/vfs_cacheprime.c') diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c index 15c8167a07..be934f6bd6 100644 --- a/source3/modules/vfs_cacheprime.c +++ b/source3/modules/vfs_cacheprime.c @@ -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); -- cgit