summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-08-05 11:58:58 +0200
committerJule Anger <janger@samba.org>2021-09-06 19:17:11 +0000
commitf626ffdf6d5a35e1c9c8e82e2dc9315a67100fa1 (patch)
treede28d80433f5c8fc43cd4a5b985ce8ff2f6a6ea8 /source3
parent3fe4d78f0217fb7d103a529504b6cad96c48c100 (diff)
downloadsamba-f626ffdf6d5a35e1c9c8e82e2dc9315a67100fa1.tar.gz
vfs_gpfs: pass fsp to smbd_gpfs_set_times()
No change in behaviour. Prepares for dealing with pathref fsps in smbd_gpfs_set_times(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit 9a237e168a4bbd5665bd40d521506ca3a6825198)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 8fc6bb21c90..a3e725f0fd8 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1714,7 +1714,8 @@ static void timespec_to_gpfs_time(struct timespec ts, gpfs_timestruc_t *gt,
}
}
-static int smbd_gpfs_set_times(int fd, char *path, struct smb_file_time *ft)
+static int smbd_gpfs_set_times(struct files_struct *fsp,
+ struct smb_file_time *ft)
{
gpfs_timestruc_t gpfs_times[4];
int flags = 0;
@@ -1731,12 +1732,12 @@ static int smbd_gpfs_set_times(int fd, char *path, struct smb_file_time *ft)
return 0;
}
- rc = gpfswrap_set_times(fd, flags, gpfs_times);
+ rc = gpfswrap_set_times(fsp_get_io_fd(fsp), flags, gpfs_times);
if (rc != 0 && errno != ENOSYS) {
DBG_WARNING("gpfs_set_times() returned with error %s for %s\n",
strerror(errno),
- path);
+ fsp_str_dbg(fsp));
}
return rc;
@@ -1758,9 +1759,7 @@ static int vfs_gpfs_fntimes(struct vfs_handle_struct *handle,
/* Try to use gpfs_set_times if it is enabled and available */
if (config->settimes) {
- ret = smbd_gpfs_set_times(fsp_get_io_fd(fsp),
- fsp->fsp_name->base_name,
- ft);
+ ret = smbd_gpfs_set_times(fsp, ft);
if (ret == 0 || (ret == -1 && errno != ENOSYS)) {
return ret;
}