vfs_gpfs: Remove wrong get_full_smb_filename from ntimes function
authorChristof Schmitt <cs@samba.org>
Tue, 22 May 2018 19:22:06 +0000 (12:22 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2018 20:52:12 +0000 (22:52 +0200)
Updating the timestamps requires the path to the file, but no stream
information.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 965dfac92a0feb2fec1442d54a18cd80a83a1049..19c6193173236514493ec0c3ea7a19ca4ea2ae1b 100644 (file)
@@ -1888,23 +1888,15 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle,
 
         struct gpfs_winattr attrs;
         int ret;
-        char *path = NULL;
-        NTSTATUS status;
        struct gpfs_config_data *config;
 
        SMB_VFS_HANDLE_GET_DATA(handle, config,
                                struct gpfs_config_data,
                                return -1);
 
-       status = get_full_smb_filename(talloc_tos(), smb_fname, &path);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
-               return -1;
-       }
-
        /* Try to use gpfs_set_times if it is enabled and available */
        if (config->settimes) {
-               ret = smbd_gpfs_set_times_path(path, ft);
+               ret = smbd_gpfs_set_times_path(smb_fname->base_name, ft);
 
                if (ret == 0 || (ret == -1 && errno != ENOSYS)) {
                        return ret;
@@ -1937,7 +1929,7 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle,
         attrs.creationTime.tv_sec = ft->create_time.tv_sec;
         attrs.creationTime.tv_nsec = ft->create_time.tv_nsec;
 
-       ret = gpfswrap_set_winattrs_path(discard_const_p(char, path),
+       ret = gpfswrap_set_winattrs_path(smb_fname->base_name,
                                         GPFS_WINATTR_SET_CREATION_TIME,
                                         &attrs);
         if(ret == -1 && errno != ENOSYS){