mirror of
https://github.com/samba-team/samba.git
synced 2025-10-29 04:23:51 +03:00
Remove redundant parameter fd from SMB_VFS_WRITE().
Michael
(This used to be commit c8ae7d095a)
This commit is contained in:
@@ -229,12 +229,11 @@ static int commit_open(
|
||||
static ssize_t commit_write(
|
||||
vfs_handle_struct * handle,
|
||||
files_struct * fsp,
|
||||
int fd,
|
||||
void * data,
|
||||
size_t count)
|
||||
{
|
||||
ssize_t ret;
|
||||
ret = SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, count);
|
||||
ret = SMB_VFS_NEXT_WRITE(handle, fsp, data, count);
|
||||
|
||||
if (ret > 0) {
|
||||
if (commit(handle, fsp, fsp->fh->pos, ret) == -1) {
|
||||
|
||||
@@ -262,12 +262,12 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void
|
||||
return result;
|
||||
}
|
||||
|
||||
static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
|
||||
static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
START_PROFILE_BYTES(syscall_write, n);
|
||||
result = sys_write(fd, data, n);
|
||||
result = sys_write(fsp->fh->fd, data, n);
|
||||
END_PROFILE(syscall_write);
|
||||
return result;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
|
||||
|
||||
if (result == -1 && errno == ESPIPE) {
|
||||
/* Maintain the fiction that pipes can be sought on. */
|
||||
result = SMB_VFS_WRITE(fsp, fsp->fh->fd, data, n);
|
||||
result = SMB_VFS_WRITE(fsp, data, n);
|
||||
}
|
||||
|
||||
#else /* HAVE_PWRITE */
|
||||
@@ -300,7 +300,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
|
||||
return -1;
|
||||
}
|
||||
|
||||
result = SMB_VFS_WRITE(fsp, fsp->fh->fd, data, n);
|
||||
result = SMB_VFS_WRITE(fsp, data, n);
|
||||
lerrno = errno;
|
||||
|
||||
SMB_VFS_LSEEK(fsp, curr, SEEK_SET);
|
||||
@@ -712,7 +712,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
|
||||
SMB_OFF_T retlen;
|
||||
SMB_OFF_T current_len_to_write = MIN(sizeof(zero_space),space_to_write);
|
||||
|
||||
retlen = SMB_VFS_WRITE(fsp,fsp->fh->fd,(char *)zero_space,current_len_to_write);
|
||||
retlen = SMB_VFS_WRITE(fsp,(char *)zero_space,current_len_to_write);
|
||||
if (retlen <= 0)
|
||||
return -1;
|
||||
|
||||
@@ -787,7 +787,7 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_O
|
||||
if (SMB_VFS_LSEEK(fsp, len-1, SEEK_SET) != len -1)
|
||||
goto done;
|
||||
|
||||
if (SMB_VFS_WRITE(fsp, fsp->fh->fd, &c, 1)!=1)
|
||||
if (SMB_VFS_WRITE(fsp, &c, 1)!=1)
|
||||
goto done;
|
||||
|
||||
/* Seek to where we were */
|
||||
|
||||
@@ -117,7 +117,7 @@ static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
|
||||
static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp,
|
||||
void *data, size_t n, SMB_OFF_T offset);
|
||||
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
|
||||
int fd, const void *data, size_t n);
|
||||
const void *data, size_t n);
|
||||
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
|
||||
const void *data, size_t n,
|
||||
SMB_OFF_T offset);
|
||||
@@ -1111,11 +1111,11 @@ static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp
|
||||
}
|
||||
|
||||
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
|
||||
int fd, const void *data, size_t n)
|
||||
const void *data, size_t n)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
result = SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, n);
|
||||
result = SMB_VFS_NEXT_WRITE(handle, fsp, data, n);
|
||||
|
||||
do_log(SMB_VFS_OP_WRITE, (result >= 0), handle, "%s", fsp->fsp_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user