git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b5aec
)
r17131: Optimisation - when doing a stat open don't open the
author
Jeremy Allison
<jra@samba.org>
Wed, 19 Jul 2006 05:32:12 +0000
(
05:32
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:38:14 +0000
(11:38 -0500)
file unless we really have to (ie. O_CREAT and file
doesn't exist).
Jeremy.
source/smbd/open.c
patch
|
blob
|
history
diff --git
a/source/smbd/open.c
b/source/smbd/open.c
index 53178956cdd0b195c91d7c388cd58e715a44ebb6..4033243888edad1054aaea3c9b8c4cc32d3ce250 100644
(file)
--- a/
source/smbd/open.c
+++ b/
source/smbd/open.c
@@
-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) ) {
/*