From: Samuel Cabrero Date: Tue, 13 Apr 2021 15:17:00 +0000 (+0200) Subject: s3: VFS: ceph: Remove SMB_VFS_NTIMES() X-Git-Tag: tevent-0.11.0~1131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0456cad10cc752e92e99b9226250ef05d27be3be;p=thirdparty%2Fsamba.git s3: VFS: ceph: Remove SMB_VFS_NTIMES() Signed-off-by: Samuel Cabrero Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 92a8bd2e058..82b956ae85a 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -792,38 +792,6 @@ static int cephwrap_lstat(struct vfs_handle_struct *handle, return result; } -static int cephwrap_ntimes(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft) -{ - struct ceph_statx stx = { 0 }; - int result; - int mask = 0; - - if (!is_omit_timespec(&ft->atime)) { - stx.stx_atime = ft->atime; - mask |= CEPH_SETATTR_ATIME; - } - if (!is_omit_timespec(&ft->mtime)) { - stx.stx_mtime = ft->mtime; - mask |= CEPH_SETATTR_MTIME; - } - if (!is_omit_timespec(&ft->create_time)) { - stx.stx_btime = ft->create_time; - mask |= CEPH_SETATTR_BTIME; - } - - if (!mask) { - return 0; - } - - result = ceph_setattrx(handle->data, smb_fname->base_name, &stx, mask, 0); - DBG_DEBUG("[CEPH] ntimes(%p, %s, {%ld, %ld, %ld, %ld}) = %d\n", handle, smb_fname_str_dbg(smb_fname), - ft->mtime.tv_sec, ft->atime.tv_sec, ft->ctime.tv_sec, - ft->create_time.tv_sec, result); - return result; -} - static int cephwrap_fntimes(struct vfs_handle_struct *handle, files_struct *fsp, struct smb_file_time *ft) @@ -1632,7 +1600,6 @@ static struct vfs_fn_pointers ceph_fns = { .lchown_fn = cephwrap_lchown, .chdir_fn = cephwrap_chdir, .getwd_fn = cephwrap_getwd, - .ntimes_fn = cephwrap_ntimes, .fntimes_fn = cephwrap_fntimes, .ftruncate_fn = cephwrap_ftruncate, .fallocate_fn = cephwrap_fallocate,