mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
smbd: Introduce fsp_is_alternate_stream()
To me this is more descriptive than "fsp->base_fsp != NULL". If this
turns out to be a performance problem, I would go and make this a
static inline in smbd/proto.h.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(backported from commit 21b380ca13
)
[slow@samba.org: only backport the function, skip all changed callers]
This commit is contained in:
parent
df7d6f0c48
commit
3160ff28e8
@ -1597,3 +1597,8 @@ void fsp_set_base_fsp(struct files_struct *fsp, struct files_struct *base_fsp)
|
|||||||
fsp->base_fsp->stream_fsp = fsp;
|
fsp->base_fsp->stream_fsp = fsp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool fsp_is_alternate_stream(const struct files_struct *fsp)
|
||||||
|
{
|
||||||
|
return (fsp->base_fsp != NULL);
|
||||||
|
}
|
||||||
|
@ -436,6 +436,7 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
|
|||||||
const struct smb_filename *smb_fname_in);
|
const struct smb_filename *smb_fname_in);
|
||||||
size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen);
|
size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen);
|
||||||
void fsp_set_base_fsp(struct files_struct *fsp, struct files_struct *base_fsp);
|
void fsp_set_base_fsp(struct files_struct *fsp, struct files_struct *base_fsp);
|
||||||
|
bool fsp_is_alternate_stream(const struct files_struct *fsp);
|
||||||
|
|
||||||
NTSTATUS create_internal_fsp(connection_struct *conn,
|
NTSTATUS create_internal_fsp(connection_struct *conn,
|
||||||
const struct smb_filename *smb_fname,
|
const struct smb_filename *smb_fname,
|
||||||
|
Loading…
Reference in New Issue
Block a user