summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-06-22 17:03:20 -0700
committerRalph Boehme <slow@samba.org>2021-06-25 15:53:31 +0000
commita117624bb193e32222ba7ed5eb5bafc8b1e0d876 (patch)
tree59c454fd34562e2efd4bc2546132e890a2daa21e /source3
parent0c210a84dbfdf81e31dd1e79736c1d9e695d3fc7 (diff)
downloadsamba-a117624bb193e32222ba7ed5eb5bafc8b1e0d876.tar.gz
s3: VFS: streams_xattr: Rename get_xattr_size() -> get_xattr_size_fsp().
It now only needs 2 parameters, fsp and EA name. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_streams_xattr.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 9692609a755..67ae1035229 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -45,31 +45,19 @@ struct stream_io {
vfs_handle_struct *handle;
};
-static ssize_t get_xattr_size(connection_struct *conn,
- struct files_struct *fsp,
- const struct smb_filename *smb_fname,
- const char *xattr_name)
+static ssize_t get_xattr_size_fsp(struct files_struct *fsp,
+ const char *xattr_name)
{
NTSTATUS status;
struct ea_struct ea;
ssize_t result;
- if (fsp) {
- status = get_ea_value(talloc_tos(),
- conn,
- fsp,
- NULL,
- xattr_name,
- &ea);
- } else {
- status = get_ea_value(talloc_tos(),
- conn,
- NULL,
- smb_fname,
- xattr_name,
- &ea);
- }
-
+ status = get_ea_value(talloc_tos(),
+ fsp->conn,
+ fsp,
+ NULL,
+ xattr_name,
+ &ea);
if (!NT_STATUS_IS_OK(status)) {
return -1;
}
@@ -211,10 +199,8 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
return -1;
}
- sbuf->st_ex_size = get_xattr_size(handle->conn,
- fsp->base_fsp,
- NULL,
- io->xattr_name);
+ sbuf->st_ex_size = get_xattr_size_fsp(fsp->base_fsp,
+ io->xattr_name);
if (sbuf->st_ex_size == -1) {
SET_STAT_INVALID(*sbuf);
return -1;
@@ -308,10 +294,8 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
}
SMB_ASSERT(fsp->base_fsp != NULL);
- smb_fname->st.st_ex_size = get_xattr_size(handle->conn,
- fsp->base_fsp,
- NULL,
- xattr_name);
+ smb_fname->st.st_ex_size = get_xattr_size_fsp(fsp->base_fsp,
+ xattr_name);
if (smb_fname->st.st_ex_size == -1) {
TALLOC_FREE(xattr_name);
TALLOC_FREE(smb_fname_cp);