return 0;
}
- if (fsp->base_fsp != NULL) {
+ if (fsp_is_alternate_stream(fsp)) {
struct files_struct *tmp_base_fsp = fsp->base_fsp;
fsp_set_base_fsp(fsp, NULL);
if (fsp == NULL) {
return status;
}
- if (fsp->base_fsp != NULL) {
+ if (fsp_is_alternate_stream(fsp)) {
struct files_struct *tmp_base_fsp = fsp->base_fsp;
fsp_set_base_fsp(fsp, NULL);
static bool close_file_in_loop(struct files_struct *fsp)
{
- if (fsp->base_fsp != NULL) {
+ if (fsp_is_alternate_stream(fsp)) {
/*
* This is a stream, it can't be a base
*/
fsp->base_fsp->stream_fsp = fsp;
}
}
+
+bool fsp_is_alternate_stream(const struct files_struct *fsp)
+{
+ return (fsp->base_fsp != NULL);
+}