vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD
authorDavid Disseldorp <ddiss@samba.org>
Tue, 26 Feb 2019 12:54:21 +0000 (13:54 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 27 Feb 2019 14:53:19 +0000 (14:53 +0000)
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 <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/modules/vfs_ceph.c

index 3fb5943eca619b135d30b130e9dc0ab8fcd49b0c..67b8d13989151ae514f68fa1f9a0c8a86f2e2a3f 100644 (file)
@@ -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,