From 84255a99384e62dc9a950e978e85bd7c9987af98 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Sep 2019 18:02:06 -0700 Subject: [PATCH] s3: VFS: vfs_ceph_snapshots: Remove unlink_fn. No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/modules/vfs_ceph_snapshots.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index 60a1db07dd6..3fbb765a5fd 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -972,26 +972,6 @@ static int ceph_snap_gmt_open(vfs_handle_struct *handle, return ret; } -static int ceph_snap_gmt_unlink(vfs_handle_struct *handle, - const struct smb_filename *csmb_fname) -{ - 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_UNLINK(handle, csmb_fname); -} - static int ceph_snap_gmt_unlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *csmb_fname, @@ -1661,7 +1641,6 @@ static struct vfs_fn_pointers ceph_snap_fns = { .stat_fn = ceph_snap_gmt_stat, .lstat_fn = ceph_snap_gmt_lstat, .open_fn = ceph_snap_gmt_open, - .unlink_fn = ceph_snap_gmt_unlink, .unlinkat_fn = ceph_snap_gmt_unlinkat, .chmod_fn = ceph_snap_gmt_chmod, .chown_fn = ceph_snap_gmt_chown, -- 2.47.3