From: Ralph Boehme Date: Tue, 13 Oct 2020 10:02:34 +0000 (+0200) Subject: vfs: SMB_VFS_GET_COMPRESSION() -> SMB_VFS_FGET_COMPRESSION() X-Git-Tag: samba-4.14.0rc1~259 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a55a2bfb9143002161ef119298891725c6d3c075;p=thirdparty%2Fsamba.git vfs: SMB_VFS_GET_COMPRESSION() -> SMB_VFS_FGET_COMPRESSION() Now that handle based fdos_mode() is used everywhere we can be sure that we're also always getting a handle in SMB_VFS_GET_COMPRESSION() so we can now safely remove the path parameter. :) Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/docs-xml/manpages/vfs_full_audit.8.xml b/docs-xml/manpages/vfs_full_audit.8.xml index 674b032017d..d4fbdb4f02e 100644 --- a/docs-xml/manpages/vfs_full_audit.8.xml +++ b/docs-xml/manpages/vfs_full_audit.8.xml @@ -60,6 +60,7 @@ fchmod fchown fdopendir + fget_compression fget_dos_attributes fget_nt_acl_at fgetxattr @@ -78,7 +79,6 @@ fsync_send ftruncate get_alloc_size - get_compression get_dfs_referrals get_dos_attributes get_dos_attributes_recv diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index fd7da962ceb..881a7fdaf1c 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -620,10 +620,9 @@ static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle, +static NTSTATUS skel_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { return NT_STATUS_INVALID_DEVICE_REQUEST; @@ -1106,7 +1105,7 @@ static struct vfs_fn_pointers skel_opaque_fns = { .offload_read_recv_fn = skel_offload_read_recv, .offload_write_send_fn = skel_offload_write_send, .offload_write_recv_fn = skel_offload_write_recv, - .get_compression_fn = skel_get_compression, + .fget_compression_fn = skel_fget_compression, .set_compression_fn = skel_set_compression, .streaminfo_fn = skel_streaminfo, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index b83a67f3a7f..2680b4f3285 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -829,13 +829,12 @@ static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle, +static NTSTATUS skel_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { - return SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname, + return SMB_VFS_NEXT_FGET_COMPRESSION(handle, mem_ctx, fsp, _compression_fmt); } @@ -1411,7 +1410,7 @@ static struct vfs_fn_pointers skel_transparent_fns = { .offload_read_recv_fn = skel_offload_read_recv, .offload_write_send_fn = skel_offload_write_send, .offload_write_recv_fn = skel_offload_write_recv, - .get_compression_fn = skel_get_compression, + .fget_compression_fn = skel_fget_compression, .set_compression_fn = skel_set_compression, .streaminfo_fn = skel_streaminfo, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 7e06705e04b..1a5d71e8401 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -339,6 +339,7 @@ * Version 44 - Add 'have_proc_fds' flag to struct files_struct. * Version 44 - Add dirfsp arg to SMB_VFS_READDIR() * Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES() + * Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION() */ #define SMB_VFS_INTERFACE_VERSION 44 @@ -1080,10 +1081,9 @@ struct vfs_fn_pointers { NTSTATUS (*offload_write_recv_fn)(struct vfs_handle_struct *handle, struct tevent_req *req, off_t *copied); - NTSTATUS (*get_compression_fn)(struct vfs_handle_struct *handle, + NTSTATUS (*fget_compression_fn)(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt); NTSTATUS (*set_compression_fn)(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, @@ -1678,10 +1678,9 @@ struct tevent_req *smb_vfs_call_offload_write_send(struct vfs_handle_struct *han NTSTATUS smb_vfs_call_offload_write_recv(struct vfs_handle_struct *handle, struct tevent_req *req, off_t *copied); -NTSTATUS smb_vfs_call_get_compression(struct vfs_handle_struct *handle, +NTSTATUS smb_vfs_call_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt); NTSTATUS smb_vfs_call_set_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, @@ -2068,10 +2067,9 @@ struct tevent_req *vfs_not_implemented_offload_write_send( NTSTATUS vfs_not_implemented_offload_write_recv(struct vfs_handle_struct *handle, struct tevent_req *req, off_t *copied); -NTSTATUS vfs_not_implemented_get_compression(struct vfs_handle_struct *handle, +NTSTATUS vfs_not_implemented_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt); NTSTATUS vfs_not_implemented_set_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 058a678f6d9..80720ad16cd 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -443,10 +443,10 @@ #define SMB_VFS_NEXT_OFFLOAD_WRITE_RECV(handle, req, copied) \ smb_vfs_call_offload_write_recv((handle)->next, (req), (copied)) -#define SMB_VFS_GET_COMPRESSION(conn, mem_ctx, fsp, smb_fname, _compression_fmt) \ - smb_vfs_call_get_compression((conn)->vfs_handles, (mem_ctx), (fsp), (smb_fname), (_compression_fmt)) -#define SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname, _compression_fmt) \ - smb_vfs_call_get_compression((handle)->next, (mem_ctx), (fsp), (smb_fname), (_compression_fmt)) +#define SMB_VFS_FGET_COMPRESSION(conn, mem_ctx, fsp, _compression_fmt) \ + smb_vfs_call_fget_compression((conn)->vfs_handles, (mem_ctx), (fsp), (_compression_fmt)) +#define SMB_VFS_NEXT_FGET_COMPRESSION(handle, mem_ctx, fsp, _compression_fmt) \ + smb_vfs_call_fget_compression((handle)->next, (mem_ctx), (fsp), (_compression_fmt)) #define SMB_VFS_SET_COMPRESSION(conn, mem_ctx, fsp, compression_fmt) \ smb_vfs_call_set_compression((conn)->vfs_handles, (mem_ctx), (fsp), (compression_fmt)) diff --git a/source3/modules/vfs_btrfs.c b/source3/modules/vfs_btrfs.c index 8263e2768a6..789bc6d6e8a 100644 --- a/source3/modules/vfs_btrfs.c +++ b/source3/modules/vfs_btrfs.c @@ -451,46 +451,48 @@ static NTSTATUS btrfs_offload_write_recv(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -/* - * caller must pass a non-null fsp or smb_fname. If fsp is null, then - * fall back to opening the corresponding file to issue the ioctl. - */ -static NTSTATUS btrfs_get_compression(struct vfs_handle_struct *handle, - TALLOC_CTX *mem_ctx, - struct files_struct *fsp, - struct smb_filename *smb_fname, - uint16_t *_compression_fmt) +static NTSTATUS btrfs_fget_compression(struct vfs_handle_struct *handle, + TALLOC_CTX *mem_ctx, + struct files_struct *fsp, + uint16_t *_compression_fmt) { + char buf[PATH_MAX]; + const char *p = NULL; int ret; long flags = 0; - int fd; - bool opened = false; + int fd = -1; NTSTATUS status; - DIR *dir = NULL; - - if ((fsp != NULL) && (fsp_get_io_fd(fsp) != -1)) { - fd = fsp_get_io_fd(fsp); - } else if (smb_fname != NULL) { - if (S_ISDIR(smb_fname->st.st_ex_mode)) { - dir = opendir(smb_fname->base_name); - if (dir == NULL) { - return NT_STATUS_UNSUCCESSFUL; - } - opened = true; - fd = dirfd(dir); - if (fd < 0) { - status = NT_STATUS_UNSUCCESSFUL; - goto err_close; - } + + if (!fsp->fsp_flags.is_pathref) { + ret = ioctl(fd, FS_IOC_GETFLAGS, &flags); + if (ret < 0) { + DBG_WARNING("FS_IOC_GETFLAGS failed: %s, fd %lld\n", + strerror(errno), (long long)fd); + return map_nt_error_from_unix(errno); + } + if (flags & FS_COMPR_FL) { + *_compression_fmt = COMPRESSION_FORMAT_LZNT1; } else { - fd = open(smb_fname->base_name, O_RDONLY); - if (fd < 0) { - return NT_STATUS_UNSUCCESSFUL; - } - opened = true; + *_compression_fmt = COMPRESSION_FORMAT_NONE; } - } else { - return NT_STATUS_INVALID_PARAMETER; + return NT_STATUS_OK; + } + + if (!fsp->fsp_flags.have_proc_fds) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + fd = fsp_get_pathref_fd(fsp); + + p = sys_proc_fd_path(fd, buf, sizeof(buf)); + if (p == NULL) { + return NT_STATUS_NO_MEMORY; + } + + fd = open(p, O_RDONLY); + if (fd == -1) { + DBG_ERR("/proc open of %s failed: %s\n", p, strerror(errno)); + return map_nt_error_from_unix(errno); } ret = ioctl(fd, FS_IOC_GETFLAGS, &flags); @@ -506,13 +508,10 @@ static NTSTATUS btrfs_get_compression(struct vfs_handle_struct *handle, *_compression_fmt = COMPRESSION_FORMAT_NONE; } status = NT_STATUS_OK; + err_close: - if (opened) { - if (dir != NULL) { - closedir(dir); - } else { - close(fd); - } + if (fd != -1) { + close(fd); } return status; @@ -868,7 +867,7 @@ static struct vfs_fn_pointers btrfs_fns = { .offload_read_recv_fn = btrfs_offload_read_recv, .offload_write_send_fn = btrfs_offload_write_send, .offload_write_recv_fn = btrfs_offload_write_recv, - .get_compression_fn = btrfs_get_compression, + .fget_compression_fn = btrfs_fget_compression, .set_compression_fn = btrfs_set_compression, .snap_check_path_fn = btrfs_snap_check_path, .snap_create_fn = btrfs_snap_create, diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 51beb6b424d..21ea24000ac 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -2190,58 +2190,26 @@ static NTSTATUS catia_fsctl(struct vfs_handle_struct *handle, return result; } -static NTSTATUS catia_get_compression(vfs_handle_struct *handle, +static NTSTATUS catia_fget_compression(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { NTSTATUS result; struct catia_cache *cc = NULL; int ret; - struct smb_filename *mapped_smb_fname = NULL; - char *mapped_name = NULL; - - if (fsp != NULL) { - ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc); - if (ret != 0) { - return map_nt_error_from_unix(errno); - } - mapped_smb_fname = fsp->fsp_name; - } else { - result = catia_string_replace_allocate(handle->conn, - smb_fname->base_name, - &mapped_name, - vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(result)) { - return result; - } - - mapped_smb_fname = synthetic_smb_fname(talloc_tos(), - mapped_name, - NULL, - &smb_fname->st, - smb_fname->twrp, - smb_fname->flags); - if (mapped_smb_fname == NULL) { - TALLOC_FREE(mapped_name); - return NT_STATUS_NO_MEMORY; - } - TALLOC_FREE(mapped_name); + ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc); + if (ret != 0) { + return map_nt_error_from_unix(errno); } - result = SMB_VFS_NEXT_GET_COMPRESSION(handle, + result = SMB_VFS_NEXT_FGET_COMPRESSION(handle, mem_ctx, fsp, - mapped_smb_fname, _compression_fmt); - if (fsp != NULL) { - CATIA_FETCH_FSP_POST_NEXT(&cc, fsp); - } else { - TALLOC_FREE(mapped_smb_fname); - } + CATIA_FETCH_FSP_POST_NEXT(&cc, fsp); return result; } @@ -2468,7 +2436,7 @@ static struct vfs_fn_pointers vfs_catia_fns = { .set_dos_attributes_fn = catia_set_dos_attributes, .fset_dos_attributes_fn = catia_fset_dos_attributes, .fget_dos_attributes_fn = catia_fget_dos_attributes, - .get_compression_fn = catia_get_compression, + .fget_compression_fn = catia_fget_compression, .set_compression_fn = catia_set_compression, .create_dfs_pathat_fn = catia_create_dfs_pathat, .read_dfs_pathat_fn = catia_read_dfs_pathat, diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 7ea0868d88b..9157355dfdb 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2337,10 +2337,9 @@ static NTSTATUS vfswrap_offload_write_recv(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static NTSTATUS vfswrap_get_compression(struct vfs_handle_struct *handle, +static NTSTATUS vfswrap_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { return NT_STATUS_INVALID_DEVICE_REQUEST; @@ -3863,7 +3862,7 @@ static struct vfs_fn_pointers vfs_default_fns = { .offload_read_recv_fn = vfswrap_offload_read_recv, .offload_write_send_fn = vfswrap_offload_write_send, .offload_write_recv_fn = vfswrap_offload_write_recv, - .get_compression_fn = vfswrap_get_compression, + .fget_compression_fn = vfswrap_fget_compression, .set_compression_fn = vfswrap_set_compression, /* NT ACL operations. */ diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 2988b9aed47..39fcdfc59da 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -175,7 +175,7 @@ typedef enum _vfs_op_type { SMB_VFS_OP_OFFLOAD_READ_RECV, SMB_VFS_OP_OFFLOAD_WRITE_SEND, SMB_VFS_OP_OFFLOAD_WRITE_RECV, - SMB_VFS_OP_GET_COMPRESSION, + SMB_VFS_OP_FGET_COMPRESSION, SMB_VFS_OP_SET_COMPRESSION, SMB_VFS_OP_SNAP_CHECK_PATH, SMB_VFS_OP_SNAP_CREATE, @@ -318,7 +318,7 @@ static struct { { SMB_VFS_OP_OFFLOAD_READ_RECV, "offload_read_recv" }, { SMB_VFS_OP_OFFLOAD_WRITE_SEND, "offload_write_send" }, { SMB_VFS_OP_OFFLOAD_WRITE_RECV, "offload_write_recv" }, - { SMB_VFS_OP_GET_COMPRESSION, "get_compression" }, + { SMB_VFS_OP_FGET_COMPRESSION, "fget_compression" }, { SMB_VFS_OP_SET_COMPRESSION, "set_compression" }, { SMB_VFS_OP_SNAP_CHECK_PATH, "snap_check_path" }, { SMB_VFS_OP_SNAP_CREATE, "snap_create" }, @@ -2172,21 +2172,19 @@ static NTSTATUS smb_full_audit_offload_write_recv(struct vfs_handle_struct *hand return result; } -static NTSTATUS smb_full_audit_get_compression(vfs_handle_struct *handle, +static NTSTATUS smb_full_audit_fget_compression(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { NTSTATUS result; - result = SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname, + result = SMB_VFS_NEXT_FGET_COMPRESSION(handle, mem_ctx, fsp, _compression_fmt); - do_log(SMB_VFS_OP_GET_COMPRESSION, NT_STATUS_IS_OK(result), handle, + do_log(SMB_VFS_OP_FGET_COMPRESSION, NT_STATUS_IS_OK(result), handle, "%s", - (fsp ? fsp_str_do_log(fsp) : - smb_fname_str_do_log(handle->conn, smb_fname))); + fsp_str_do_log(fsp)); return result; } @@ -3016,7 +3014,7 @@ static struct vfs_fn_pointers vfs_full_audit_fns = { .offload_read_recv_fn = smb_full_audit_offload_read_recv, .offload_write_send_fn = smb_full_audit_offload_write_send, .offload_write_recv_fn = smb_full_audit_offload_write_recv, - .get_compression_fn = smb_full_audit_get_compression, + .fget_compression_fn = smb_full_audit_fget_compression, .set_compression_fn = smb_full_audit_set_compression, .snap_check_path_fn = smb_full_audit_snap_check_path, .snap_create_fn = smb_full_audit_snap_create, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index cc8d410b5e4..4aeccb889c4 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -622,10 +622,9 @@ NTSTATUS vfs_not_implemented_offload_write_recv(struct vfs_handle_struct *handle return NT_STATUS_OK; } -NTSTATUS vfs_not_implemented_get_compression(struct vfs_handle_struct *handle, +NTSTATUS vfs_not_implemented_fget_compression(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { return NT_STATUS_INVALID_DEVICE_REQUEST; @@ -1110,7 +1109,7 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = { .offload_read_recv_fn = vfs_not_implemented_offload_read_recv, .offload_write_send_fn = vfs_not_implemented_offload_write_send, .offload_write_recv_fn = vfs_not_implemented_offload_write_recv, - .get_compression_fn = vfs_not_implemented_get_compression, + .fget_compression_fn = vfs_not_implemented_fget_compression, .set_compression_fn = vfs_not_implemented_set_compression, .streaminfo_fn = vfs_not_implemented_streaminfo, diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index e2d257aedae..3c8459e3eaa 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -2126,10 +2126,9 @@ static NTSTATUS smb_time_audit_offload_write_recv(struct vfs_handle_struct *hand return NT_STATUS_OK; } -static NTSTATUS smb_time_audit_get_compression(vfs_handle_struct *handle, +static NTSTATUS smb_time_audit_fget_compression(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { NTSTATUS result; @@ -2137,19 +2136,14 @@ static NTSTATUS smb_time_audit_get_compression(vfs_handle_struct *handle, double timediff; clock_gettime_mono(&ts1); - result = SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname, + result = SMB_VFS_NEXT_FGET_COMPRESSION(handle, mem_ctx, fsp, _compression_fmt); clock_gettime_mono(&ts2); timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9; if (timediff > audit_timeout) { - if (fsp != NULL) { - smb_time_audit_log_fsp("get_compression", - timediff, fsp); - } else { - smb_time_audit_log_smb_fname("get_compression", - timediff, smb_fname); - } + smb_time_audit_log_fsp("get_compression", + timediff, fsp); } return result; @@ -2884,7 +2878,7 @@ static struct vfs_fn_pointers vfs_time_audit_fns = { .offload_read_recv_fn = smb_time_audit_offload_read_recv, .offload_write_send_fn = smb_time_audit_offload_write_send, .offload_write_recv_fn = smb_time_audit_offload_write_recv, - .get_compression_fn = smb_time_audit_get_compression, + .fget_compression_fn = smb_time_audit_fget_compression, .set_compression_fn = smb_time_audit_set_compression, .snap_check_path_fn = smb_time_audit_snap_check_path, .snap_create_fn = smb_time_audit_snap_create, diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 1d2f309a595..ccfeaca124d 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -609,7 +609,7 @@ static NTSTATUS dos_mode_check_compressed(connection_struct *conn, goto err_out; } - status = SMB_VFS_GET_COMPRESSION(conn, tmp_ctx, fsp, smb_fname, + status = SMB_VFS_FGET_COMPRESSION(conn, tmp_ctx, fsp, &compression_fmt); if (!NT_STATUS_IS_OK(status)) { goto err_ctx_free; diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c index a398920bfed..e7bd11f90ab 100644 --- a/source3/smbd/smb2_ioctl_filesys.c +++ b/source3/smbd/smb2_ioctl_filesys.c @@ -353,10 +353,9 @@ static NTSTATUS fsctl_get_cmprn(TALLOC_CTX *mem_ctx, ZERO_STRUCT(cmpr_state); if (fsp->conn->fs_capabilities & FILE_FILE_COMPRESSION) { - status = SMB_VFS_GET_COMPRESSION(fsp->conn, + status = SMB_VFS_FGET_COMPRESSION(fsp->conn, mem_ctx, fsp, - NULL, &cmpr_state.format); if (!NT_STATUS_IS_OK(status)) { return status; diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 9811efe6e2c..afff32063b5 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2623,14 +2623,13 @@ NTSTATUS smb_vfs_call_get_dos_attributes_recv( return NT_STATUS_OK; } -NTSTATUS smb_vfs_call_get_compression(vfs_handle_struct *handle, +NTSTATUS smb_vfs_call_fget_compression(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *fsp, - struct smb_filename *smb_fname, uint16_t *_compression_fmt) { - VFS_FIND(get_compression); - return handle->fns->get_compression_fn(handle, mem_ctx, fsp, smb_fname, + VFS_FIND(fget_compression); + return handle->fns->fget_compression_fn(handle, mem_ctx, fsp, _compression_fmt); }