1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

vfs_fruit: use "fake_fd" instead of "created"

Both have basically the same semantics.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-12-11 13:00:09 +01:00 committed by Jeremy Allison
parent 40e70cbd3c
commit 36eb30fd7d

View File

@ -178,9 +178,6 @@ struct fio {
/* Denote stream type, meta or rsrc */ /* Denote stream type, meta or rsrc */
adouble_type_t type; adouble_type_t type;
/* Whether the create created the stream */
bool created;
/* /*
* AFP_AfpInfo stream created, but not written yet, thus still a fake * AFP_AfpInfo stream created, but not written yet, thus still a fake
* pipe fd. This is set to true in fruit_open_meta if there was no * pipe fd. This is set to true in fruit_open_meta if there was no
@ -2236,7 +2233,7 @@ static ssize_t fruit_pread_meta(vfs_handle_struct *handle,
return -1; return -1;
} }
if (nread == -1 && fio->created) { if (nread == -1 && fio->fake_fd) {
AfpInfo *ai = NULL; AfpInfo *ai = NULL;
char afpinfo_buf[AFP_INFO_SIZE]; char afpinfo_buf[AFP_INFO_SIZE];
@ -3938,7 +3935,6 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
NTSTATUS status; NTSTATUS status;
struct fruit_config_data *config = NULL; struct fruit_config_data *config = NULL;
files_struct *fsp = NULL; files_struct *fsp = NULL;
struct fio *fio = NULL;
bool internal_open = (oplock_request & INTERNAL_OPEN_ONLY); bool internal_open = (oplock_request & INTERNAL_OPEN_ONLY);
int ret; int ret;
@ -4011,11 +4007,6 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
goto fail; goto fail;
} }
fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
if (fio != NULL && pinfo != NULL && *pinfo == FILE_WAS_CREATED) {
fio->created = true;
}
if (is_named_stream(smb_fname) || fsp->fsp_flags.is_directory) { if (is_named_stream(smb_fname) || fsp->fsp_flags.is_directory) {
return status; return status;
} }