s3/modules: VFS: snapper: Remove snapper_gmt_chmod
authorNoel Power <noel.power@suse.com>
Fri, 9 Apr 2021 13:59:06 +0000 (15:59 +0200)
committerNoel Power <npower@samba.org>
Sun, 11 Apr 2021 22:27:34 +0000 (22:27 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_snapper.c

index 412a77059c9e740550c5074d73fcffa9f3c41e94..7ee769b0d589184ffc291e46358dd23f18341a19 100644 (file)
@@ -2150,26 +2150,6 @@ static int snapper_gmt_unlinkat(vfs_handle_struct *handle,
                        flags);
 }
 
-static int snapper_gmt_chmod(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       time_t timestamp = 0;
-
-       if (!snapper_gmt_strip_snapshot(talloc_tos(),
-                               handle,
-                               smb_fname,
-                               &timestamp,
-                               NULL)) {
-               return -1;
-       }
-       if (timestamp != 0) {
-               errno = EROFS;
-               return -1;
-       }
-       return SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
-}
-
 static int snapper_gmt_fchmod(vfs_handle_struct *handle,
                        struct files_struct *fsp,
                        mode_t mode)
@@ -2749,7 +2729,6 @@ static struct vfs_fn_pointers snapper_fns = {
        .lstat_fn = snapper_gmt_lstat,
        .openat_fn = snapper_gmt_openat,
        .unlinkat_fn = snapper_gmt_unlinkat,
-       .chmod_fn = snapper_gmt_chmod,
        .fchmod_fn = snapper_gmt_fchmod,
        .chdir_fn = snapper_gmt_chdir,
        .ntimes_fn = snapper_gmt_ntimes,