s3: VFS: vfs_snapper. Remove link_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 23:26:34 +0000 (16:26 -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_snapper.c

index 910591b1219cf773b6aa6d0ca62cb687d3e692c8..2da3265e147bbf90d3057e7c32be4e4cc1179dfd 100644 (file)
@@ -2071,34 +2071,6 @@ static int snapper_gmt_symlink(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname);
 }
 
-static int snapper_gmt_link(vfs_handle_struct *handle,
-                               const struct smb_filename *old_smb_fname,
-                               const struct smb_filename *new_smb_fname)
-{
-       time_t timestamp_old = 0;
-       time_t timestamp_new = 0;
-
-       if (!snapper_gmt_strip_snapshot(talloc_tos(),
-                               handle,
-                               old_smb_fname->base_name,
-                               &timestamp_old,
-                               NULL)) {
-               return -1;
-       }
-       if (!snapper_gmt_strip_snapshot(talloc_tos(),
-                               handle,
-                               new_smb_fname->base_name,
-                               &timestamp_new,
-                               NULL)) {
-               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 snapper_gmt_linkat(vfs_handle_struct *handle,
                                files_struct *srcfsp,
                                const struct smb_filename *old_smb_fname,
@@ -2898,7 +2870,6 @@ static struct vfs_fn_pointers snapper_fns = {
        .disk_free_fn = snapper_gmt_disk_free,
        .get_quota_fn = snapper_gmt_get_quota,
        .renameat_fn = snapper_gmt_renameat,
-       .link_fn = snapper_gmt_link,
        .linkat_fn = snapper_gmt_linkat,
        .symlink_fn = snapper_gmt_symlink,
        .stat_fn = snapper_gmt_stat,