From: Volker Lendecke Date: Tue, 27 Jan 2026 17:37:02 +0000 (+0100) Subject: vfs_gpfs: Use fstatvfs() instead of the path-based statvfs() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9a646530d38d773ee516bf0c10121982cdf988b;p=thirdparty%2Fsamba.git vfs_gpfs: Use fstatvfs() instead of the path-based statvfs() Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 882d4056965..9b92eb97446 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -2319,6 +2319,7 @@ static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, uint64_t *dsize) { const struct smb_filename *smb_fname = fsp->fsp_name; + int fd = fsp_get_pathref_fd(fsp); struct security_unix_token *utok; struct gpfs_quotaInfo qi_user = { 0 }, qi_group = { 0 }; struct gpfs_config_data *config; @@ -2333,7 +2334,7 @@ static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, handle, fsp, bsize, dfree, dsize); } - err = sys_statvfs(smb_fname->base_name, &statvfsbuf); + err = sys_fstatvfs(fd, &statvfsbuf); if (err) { DEBUG (0, ("Could not get fs usage, errno %d\n", errno)); return SMB_VFS_NEXT_DISK_FREE(