1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r17131: Optimisation - when doing a stat open don't open the

file unless we really have to (ie. O_CREAT and file
doesn't exist).
Jeremy.
This commit is contained in:
Jeremy Allison 2006-07-19 05:32:12 +00:00 committed by Gerald (Jerry) Carter
parent b3b5aec0ee
commit 788aa15ea2

View File

@ -245,7 +245,7 @@ static NTSTATUS open_file(files_struct *fsp,
}
if ((access_mask & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ||
(local_flags & O_CREAT) ||
(!file_existed && (local_flags & O_CREAT)) ||
((local_flags & O_TRUNC) == O_TRUNC) ) {
/*