From: Jeremy Allison Date: Thu, 10 Oct 2019 21:23:15 +0000 (-0700) Subject: s3: VFS: vfs_ceph_snapshots: Remove chown_fn(). X-Git-Tag: talloc-2.3.1~359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f8f797975931854e485fbf649b75897f0d6f775;p=thirdparty%2Fsamba.git s3: VFS: vfs_ceph_snapshots: Remove chown_fn(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index 680716fcf98..ce364ae83dc 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -1018,28 +1018,6 @@ static int ceph_snap_gmt_chmod(vfs_handle_struct *handle, return SMB_VFS_NEXT_CHMOD(handle, csmb_fname, mode); } -static int ceph_snap_gmt_chown(vfs_handle_struct *handle, - const struct smb_filename *csmb_fname, - uid_t uid, - gid_t gid) -{ - time_t timestamp = 0; - int ret; - - ret = ceph_snap_gmt_strip_snapshot(handle, - csmb_fname->base_name, - ×tamp, NULL, 0); - if (ret < 0) { - errno = -ret; - return -1; - } - if (timestamp != 0) { - errno = EROFS; - return -1; - } - return SMB_VFS_NEXT_CHOWN(handle, csmb_fname, uid, gid); -} - static int ceph_snap_gmt_chdir(vfs_handle_struct *handle, const struct smb_filename *csmb_fname) { @@ -1623,7 +1601,6 @@ static struct vfs_fn_pointers ceph_snap_fns = { .open_fn = ceph_snap_gmt_open, .unlinkat_fn = ceph_snap_gmt_unlinkat, .chmod_fn = ceph_snap_gmt_chmod, - .chown_fn = ceph_snap_gmt_chown, .chdir_fn = ceph_snap_gmt_chdir, .ntimes_fn = ceph_snap_gmt_ntimes, .readlinkat_fn = ceph_snap_gmt_readlinkat,