]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_gpfs: Remove gpfs_stat_x fallback
authorChristof Schmitt <cs@samba.org>
Tue, 4 Feb 2025 20:09:11 +0000 (13:09 -0700)
committerJule Anger <janger@samba.org>
Thu, 6 Feb 2025 11:24:41 +0000 (11:24 +0000)
Since GPFS 5.1.2 gpfs_stat_x accepts O_PATH descriptors so the fallback
case is no longer used and can be removed.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_gpfs.c

index fb3e8c806e1307c54a05d5adad7a2a611bbeb770..b29ef338a51ce2878269fd4b89376b5564315a93 100644 (file)
@@ -1447,8 +1447,6 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle,
 {
        struct gpfs_config_data *config;
        int fd = fsp_get_pathref_fd(fsp);
-       struct sys_proc_fd_path_buf buf;
-       const char *p = NULL;
        struct gpfs_iattr64 iattr = { };
        unsigned int litemask = 0;
        struct timespec ts;
@@ -1462,19 +1460,7 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle,
                return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
        }
 
-       if (fsp->fsp_flags.is_pathref && !config->pathref_ok.gpfs_fstat_x) {
-               if (fsp->fsp_flags.have_proc_fds) {
-                       p = sys_proc_fd_path(fd, &buf);
-               } else {
-                       p = fsp->fsp_name->base_name;
-               }
-       }
-
-       if (p != NULL) {
-               ret = gpfswrap_stat_x(p, &litemask, &iattr, sizeof(iattr));
-       } else {
-               ret = gpfswrap_fstat_x(fd, &litemask, &iattr, sizeof(iattr));
-       }
+       ret = gpfswrap_fstat_x(fd, &litemask, &iattr, sizeof(iattr));
        if (ret == -1 && errno == ENOSYS) {
                return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
        }
@@ -1491,17 +1477,7 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle,
 
                set_effective_capability(DAC_OVERRIDE_CAPABILITY);
 
-               if (p != NULL) {
-                       ret = gpfswrap_stat_x(p,
-                                             &litemask,
-                                             &iattr,
-                                             sizeof(iattr));
-               } else {
-                       ret = gpfswrap_fstat_x(fd,
-                                              &litemask,
-                                              &iattr,
-                                              sizeof(iattr));
-               }
+               ret = gpfswrap_fstat_x(fd, &litemask, &iattr, sizeof(iattr));
                if (ret == -1) {
                        saved_errno = errno;
                }