From: Jeremy Allison Date: Fri, 9 Aug 2019 22:59:05 +0000 (-0700) Subject: s3: VFS: vfs_ceph_snapshots. Remove rename_fn(). No longer used. X-Git-Tag: tdb-1.4.2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52960225fa8727f9dfe91f76e921a3c56168347c;p=thirdparty%2Fsamba.git s3: VFS: vfs_ceph_snapshots. Remove rename_fn(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index 3bc89174c7e..5b4296f0caf 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -756,38 +756,6 @@ static DIR *ceph_snap_gmt_opendir(vfs_handle_struct *handle, return dir; } -static int ceph_snap_gmt_rename(vfs_handle_struct *handle, - const struct smb_filename *smb_fname_src, - const struct smb_filename *smb_fname_dst) -{ - int ret; - time_t timestamp_src, timestamp_dst; - - ret = ceph_snap_gmt_strip_snapshot(handle, - smb_fname_src->base_name, - ×tamp_src, NULL, 0); - if (ret < 0) { - errno = -ret; - return -1; - } - ret = ceph_snap_gmt_strip_snapshot(handle, - smb_fname_dst->base_name, - ×tamp_dst, NULL, 0); - if (ret < 0) { - errno = -ret; - return -1; - } - if (timestamp_src != 0) { - errno = EXDEV; - return -1; - } - if (timestamp_dst != 0) { - errno = EROFS; - return -1; - } - return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst); -} - static int ceph_snap_gmt_renameat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *smb_fname_src, @@ -1632,7 +1600,6 @@ static struct vfs_fn_pointers ceph_snap_fns = { .opendir_fn = ceph_snap_gmt_opendir, .disk_free_fn = ceph_snap_gmt_disk_free, .get_quota_fn = ceph_snap_gmt_get_quota, - .rename_fn = ceph_snap_gmt_rename, .renameat_fn = ceph_snap_gmt_renameat, .link_fn = ceph_snap_gmt_link, .symlink_fn = ceph_snap_gmt_symlink,