vfs_gpfs: Remove get_full_smb_filename from is_offline check
authorChristof Schmitt <cs@samba.org>
Tue, 22 May 2018 19:25:42 +0000 (12:25 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2018 20:52:12 +0000 (22:52 +0200)
No stream information is required here.

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

index 19c6193173236514493ec0c3ea7a19ca4ea2ae1b..992785d91a36f9ea31c6cb70213bdc1d6f0cc1fa 100644 (file)
@@ -2003,8 +2003,6 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
                                SMB_STRUCT_STAT *sbuf)
 {
        struct gpfs_winattr attrs;
-       char *path = NULL;
-       NTSTATUS status;
        struct gpfs_config_data *config;
        int ret;
 
@@ -2016,24 +2014,17 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
                return false;
        }
 
-       status = get_full_smb_filename(talloc_tos(), fname, &path);
-       if (!NT_STATUS_IS_OK(status)) {
-               return false;
-       }
-
-       ret = gpfswrap_get_winattrs_path(path, &attrs);
+       ret = gpfswrap_get_winattrs_path(fname->base_name, &attrs);
        if (ret == -1) {
-               TALLOC_FREE(path);
                return false;
        }
 
        if ((attrs.winAttrs & GPFS_WINATTR_OFFLINE) != 0) {
-               DEBUG(10, ("%s is offline\n", path));
-               TALLOC_FREE(path);
+               DBG_DEBUG("%s is offline\n", fname->base_name);
                return true;
        }
-       DEBUG(10, ("%s is online\n", path));
-       TALLOC_FREE(path);
+
+       DBG_DEBUG("%s is online\n", fname->base_name);
        return false;
 }