]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_ceph_snapshots. Remove rename_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Fri, 9 Aug 2019 22:59:05 +0000 (15:59 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 19:52:36 +0000 (19:52 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_ceph_snapshots.c

index 3bc89174c7e4c54190a6050ccd64b13b7029bf81..5b4296f0caf44b094aa7739696f5c54fa6e7cd38 100644 (file)
@@ -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,
-                                       &timestamp_src, NULL, 0);
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-       ret = ceph_snap_gmt_strip_snapshot(handle,
-                                       smb_fname_dst->base_name,
-                                       &timestamp_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,