]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_ceph_snapshots. Remove link_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 23:21:04 +0000 (16:21 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 20 Aug 2019 21:09:29 +0000 (21:09 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/vfs_ceph_snapshots.c

index bf7ce804ae7d7b9fb409fde8306167878f003368..2911907adb04ba5e4c13bc6f703d15f04e93f08b 100644 (file)
@@ -826,37 +826,6 @@ static int ceph_snap_gmt_symlink(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname);
 }
 
-static int ceph_snap_gmt_link(vfs_handle_struct *handle,
-                               const struct smb_filename *old_smb_fname,
-                               const struct smb_filename *new_smb_fname)
-{
-       int ret;
-       time_t timestamp_old = 0;
-       time_t timestamp_new = 0;
-
-       ret = ceph_snap_gmt_strip_snapshot(handle,
-                               old_smb_fname->base_name,
-                               &timestamp_old,
-                               NULL, 0);
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-       ret = ceph_snap_gmt_strip_snapshot(handle,
-                               new_smb_fname->base_name,
-                               &timestamp_new,
-                               NULL, 0);
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-       if ((timestamp_old != 0) || (timestamp_new != 0)) {
-               errno = EROFS;
-               return -1;
-       }
-       return SMB_VFS_NEXT_LINK(handle, old_smb_fname, new_smb_fname);
-}
-
 static int ceph_snap_gmt_linkat(vfs_handle_struct *handle,
                                files_struct *srcfsp,
                                const struct smb_filename *old_smb_fname,
@@ -1640,7 +1609,6 @@ static struct vfs_fn_pointers ceph_snap_fns = {
        .disk_free_fn = ceph_snap_gmt_disk_free,
        .get_quota_fn = ceph_snap_gmt_get_quota,
        .renameat_fn = ceph_snap_gmt_renameat,
-       .link_fn = ceph_snap_gmt_link,
        .linkat_fn = ceph_snap_gmt_linkat,
        .symlink_fn = ceph_snap_gmt_symlink,
        .stat_fn = ceph_snap_gmt_stat,