From aa2ab7feb10f7c8bc0d84e3dabb484f728f6f3ba Mon Sep 17 00:00:00 2001 From: Samuel Cabrero Date: Tue, 13 Apr 2021 18:00:29 +0200 Subject: [PATCH] s3: VFS: Remove SMB_VFS_NTIMES(), no longer used --------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_NTIMES | | | | | | 13 April | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Samuel Cabrero Reviewed-by: Ralph Boehme Autobuild-User(master): Samuel Cabrero Autobuild-Date(master): Mon Apr 19 13:19:35 UTC 2021 on sn-devel-184 --- examples/VFS/skel_opaque.c | 9 --------- examples/VFS/skel_transparent.c | 8 -------- source3/include/smbprofile.h | 1 - source3/include/vfs.h | 4 +--- source3/include/vfs_macros.h | 5 ----- source3/modules/The_New_VFS.org | 4 ++-- source3/modules/The_New_VFS.txt | 4 ++-- source3/smbd/vfs.c | 8 -------- 8 files changed, 5 insertions(+), 38 deletions(-) diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index a8deb8a6da6..56d2e42d160 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -399,14 +399,6 @@ static struct smb_filename *skel_getwd(vfs_handle_struct *handle, return NULL; } -static int skel_ntimes(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft) -{ - errno = ENOSYS; - return -1; -} - static int skel_fntimes(vfs_handle_struct *handle, files_struct *fsp, struct smb_file_time *ft) @@ -1042,7 +1034,6 @@ static struct vfs_fn_pointers skel_opaque_fns = { .lchown_fn = skel_lchown, .chdir_fn = skel_chdir, .getwd_fn = skel_getwd, - .ntimes_fn = skel_ntimes, .fntimes_fn = skel_fntimes, .ftruncate_fn = skel_ftruncate, .fallocate_fn = skel_fallocate, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index ba5afad1f3d..c5bcc5314d8 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -523,13 +523,6 @@ static struct smb_filename *skel_getwd(vfs_handle_struct *handle, return SMB_VFS_NEXT_GETWD(handle, ctx); } -static int skel_ntimes(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft) -{ - return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft); -} - static int skel_fntimes(vfs_handle_struct *handle, files_struct *fsp, struct smb_file_time *ft) @@ -1347,7 +1340,6 @@ static struct vfs_fn_pointers skel_transparent_fns = { .lchown_fn = skel_lchown, .chdir_fn = skel_chdir, .getwd_fn = skel_getwd, - .ntimes_fn = skel_ntimes, .fntimes_fn = skel_fntimes, .ftruncate_fn = skel_ftruncate, .fallocate_fn = skel_fallocate, diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 79212022690..1bb429778c4 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -74,7 +74,6 @@ struct tevent_context; SMBPROFILE_STATS_BASIC(syscall_lchown) \ SMBPROFILE_STATS_BASIC(syscall_chdir) \ SMBPROFILE_STATS_BASIC(syscall_getwd) \ - SMBPROFILE_STATS_BASIC(syscall_ntimes) \ SMBPROFILE_STATS_BASIC(syscall_fntimes) \ SMBPROFILE_STATS_BASIC(syscall_ftruncate) \ SMBPROFILE_STATS_BASIC(syscall_fallocate) \ diff --git a/source3/include/vfs.h b/source3/include/vfs.h index d83c67c613f..eaa816d8bec 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -348,6 +348,7 @@ * Version 45 - Remove SMB_VFS_GET_DOS_ATTRIBUTES() * Version 45 - Remove SMB_VFS_CHMOD * Version 45 - Add SMB_VFS_FNTIMES + * Version 45 - Remove SMB_VFS_NTIMES */ #define SMB_VFS_INTERFACE_VERSION 45 @@ -1017,9 +1018,6 @@ struct vfs_fn_pointers { const struct smb_filename *smb_fname); struct smb_filename *(*getwd_fn)(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx); - int (*ntimes_fn)(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft); int (*fntimes_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, struct smb_file_time *ft); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index eed6779bbaa..40ff68aedab 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -268,11 +268,6 @@ #define SMB_VFS_NEXT_GETWD(handle, ctx) \ smb_vfs_call_getwd((handle)->next, (ctx)) -#define SMB_VFS_NTIMES(conn, path, ts) \ - smb_vfs_call_ntimes((conn)->vfs_handles, (path), (ts)) -#define SMB_VFS_NEXT_NTIMES(handle, path, ts) \ - smb_vfs_call_ntimes((handle)->next, (path), (ts)) - #define SMB_VFS_FNTIMES(fsp, ts) \ smb_vfs_call_fntimes((fsp)->conn->vfs_handles, (fsp), (ts)) #define SMB_VFS_NEXT_FNTIMES(handle, fsp, ts) \ diff --git a/source3/modules/The_New_VFS.org b/source3/modules/The_New_VFS.org index 5dc899befb6..19dd46f9fe1 100644 --- a/source3/modules/The_New_VFS.org +++ b/source3/modules/The_New_VFS.org @@ -260,7 +260,7 @@ whenever VFS access is done in a piecemeal fashion. | SMB_VFS_LSTAT() | [[Path][Path]] | Todo | | SMB_VFS_MKDIRAT() | [[NsC][NsC]] | - | | SMB_VFS_MKNODAT() | [[NsC][NsC]] | - | -| SMB_VFS_NTIMES() | [[Path][Path]] | Todo | +| SMB_VFS_NTIMES() | [[Path][Path]] | - | | SMB_VFS_OFFLOAD_READ_RECV() | [[fsp][fsp]] | - | | SMB_VFS_OFFLOAD_READ_SEND() | [[fsp][fsp]] | - | | SMB_VFS_OFFLOAD_WRITE_RECV() | [[fsp][fsp]] | - | @@ -310,7 +310,7 @@ whenever VFS access is done in a piecemeal fashion. |---------------------------------+----------+--------| | SMB_VFS_SYS_ACL_DELETE_DEF_FD() | [[xpathref][xpathref]] | Todo | | SMB_VFS_READDIR_ATTRAT() | [[Enum][Enum]] | Todo | -| SMB_VFS_FUTIMENS() | [[fsp][fsp]] | Todo | +| SMB_VFS_FNTIMENS() | [[fsp][fsp]] | - | |---------------------------------+----------+--------| ** VFS functions by category diff --git a/source3/modules/The_New_VFS.txt b/source3/modules/The_New_VFS.txt index 5121229dc0a..51e7d347a16 100644 --- a/source3/modules/The_New_VFS.txt +++ b/source3/modules/The_New_VFS.txt @@ -328,7 +328,7 @@ Table of Contents SMB_VFS_LSTAT() [Path] Todo SMB_VFS_MKDIRAT() [NsC] - SMB_VFS_MKNODAT() [NsC] - - SMB_VFS_NTIMES() [Path] Todo + SMB_VFS_NTIMES() [Path] - SMB_VFS_OFFLOAD_READ_RECV() [fsp] - SMB_VFS_OFFLOAD_READ_SEND() [fsp] - SMB_VFS_OFFLOAD_WRITE_RECV() [fsp] - @@ -400,7 +400,7 @@ Table of Contents ───────────────────────────────────────────────────── SMB_VFS_SYS_ACL_DELETE_DEF_FD() [xpathref] Todo SMB_VFS_READDIR_ATTRAT() [Enum] Todo - SMB_VFS_FUTIMENS() [fsp] Todo + SMB_VFS_FNTIMENS() [fsp] - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 5a9a7afa036..b0f65e19df1 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2245,14 +2245,6 @@ struct smb_filename *smb_vfs_call_getwd(struct vfs_handle_struct *handle, return handle->fns->getwd_fn(handle, ctx); } -int smb_vfs_call_ntimes(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft) -{ - VFS_FIND(ntimes); - return handle->fns->ntimes_fn(handle, smb_fname, ft); -} - int smb_vfs_call_fntimes(struct vfs_handle_struct *handle, struct files_struct *fsp, struct smb_file_time *ft) -- 2.47.3