1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3: vfs: Use the new smb_vfs_fsync_sync() call in place of SMB_VFS_FSYNC().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2018-04-27 16:59:42 -07:00 committed by Ralph Boehme
parent a0482b9d8d
commit cf4442090e
2 changed files with 2 additions and 3 deletions

View File

@ -1057,7 +1057,7 @@ NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_throug
if (ret == -1) {
return map_nt_error_from_unix(errno);
}
ret = SMB_VFS_FSYNC(fsp);
ret = smb_vfs_fsync_sync(fsp);
if (ret == -1) {
return map_nt_error_from_unix(errno);
}

View File

@ -640,7 +640,6 @@ static NTSTATUS cmd_rename(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
return NT_STATUS_OK;
}
static NTSTATUS cmd_fsync(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
int ret, fd;
@ -650,7 +649,7 @@ static NTSTATUS cmd_fsync(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
}
fd = atoi(argv[1]);
ret = SMB_VFS_FSYNC(vfs->files[fd]);
ret = smb_vfs_fsync_sync(vfs->files[fd]);
if (ret == -1) {
printf("fsync: error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;