From: David Disseldorp Date: Tue, 26 Feb 2019 12:54:21 +0000 (+0100) Subject: vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD X-Git-Tag: talloc-2.2.0~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f43cc62fb25d607a489cafd96b21cf0788773bbf;p=thirdparty%2Fsamba.git vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD The cephwrap_fchown() and cephwrap_fchmod() wrappers call the corresponding libcephfs functions. It doesn't make sense to make this logic dependent on regular fchown()/fchmod() function presence, so remove the ifdefs. Signed-off-by: David Disseldorp Reviewed-by: Guenther Deschner --- diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 3fb5943eca6..67b8d139891 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -961,15 +961,9 @@ static int cephwrap_fchmod(struct vfs_handle_struct *handle, files_struct *fsp, int result; DBG_DEBUG("[CEPH] fchmod(%p, %p, %d)\n", handle, fsp, mode); - -#if defined(HAVE_FCHMOD) result = ceph_fchmod(handle->data, fsp->fh->fd, mode); DBG_DEBUG("[CEPH] fchmod(...) = %d\n", result); WRAP_RETURN(result); -#else - errno = ENOSYS; -#endif - return -1; } static int cephwrap_chown(struct vfs_handle_struct *handle, @@ -987,17 +981,11 @@ static int cephwrap_chown(struct vfs_handle_struct *handle, static int cephwrap_fchown(struct vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid) { int result; -#ifdef HAVE_FCHOWN DBG_DEBUG("[CEPH] fchown(%p, %p, %d, %d)\n", handle, fsp, uid, gid); result = ceph_fchown(handle->data, fsp->fh->fd, uid, gid); DBG_DEBUG("[CEPH] fchown(...) = %d\n", result); WRAP_RETURN(result); -#else - errno = ENOSYS; - result = -1; -#endif - return result; } static int cephwrap_lchown(struct vfs_handle_struct *handle,