mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3: VFS: streams_xattr: Bring streams_xattr_stat_base() inline into streams_xattr_stat().
That was its only caller. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
d515c13ba7
commit
d1a0e9b81d
@ -189,27 +189,6 @@ static bool streams_xattr_recheck(struct stream_io *sio)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to stat/lstat the base file of an smb_fname.
|
||||
*/
|
||||
static int streams_xattr_stat_base(vfs_handle_struct *handle,
|
||||
struct smb_filename *smb_fname,
|
||||
bool follow_links)
|
||||
{
|
||||
char *tmp_stream_name;
|
||||
int result;
|
||||
|
||||
tmp_stream_name = smb_fname->stream_name;
|
||||
smb_fname->stream_name = NULL;
|
||||
if (follow_links) {
|
||||
result = SMB_VFS_NEXT_STAT(handle, smb_fname);
|
||||
} else {
|
||||
result = SMB_VFS_NEXT_LSTAT(handle, smb_fname);
|
||||
}
|
||||
smb_fname->stream_name = tmp_stream_name;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
|
||||
SMB_STRUCT_STAT *sbuf)
|
||||
{
|
||||
@ -258,6 +237,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
|
||||
NTSTATUS status;
|
||||
int result = -1;
|
||||
char *xattr_name = NULL;
|
||||
char *tmp_stream_name = NULL;
|
||||
|
||||
if (!is_named_stream(smb_fname)) {
|
||||
return SMB_VFS_NEXT_STAT(handle, smb_fname);
|
||||
@ -269,7 +249,12 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
|
||||
* not following links here. */
|
||||
|
||||
/* Populate the stat struct with info from the base file. */
|
||||
if (streams_xattr_stat_base(handle, smb_fname, true) == -1) {
|
||||
tmp_stream_name = smb_fname->stream_name;
|
||||
smb_fname->stream_name = NULL;
|
||||
result = SMB_VFS_NEXT_STAT(handle, smb_fname);
|
||||
smb_fname->stream_name = tmp_stream_name;
|
||||
|
||||
if (result == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user