From: Christof Schmitt Date: Tue, 4 Feb 2025 20:09:11 +0000 (-0700) Subject: vfs_gpfs: Remove gpfs_stat_x fallback X-Git-Tag: tdb-1.4.13~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d86986da399022b7af74c283e2c5709fbd856615;p=thirdparty%2Fsamba.git vfs_gpfs: Remove gpfs_stat_x fallback 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index fb3e8c806e1..b29ef338a51 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -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; }