svn commit: samba r17131 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Wed Jul 19 05:32:13 GMT 2006


Author: jra
Date: 2006-07-19 05:32:12 +0000 (Wed, 19 Jul 2006)
New Revision: 17131

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17131

Log:
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.

Modified:
   branches/SAMBA_3_0/source/smbd/open.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/open.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/open.c	2006-07-19 05:26:51 UTC (rev 17130)
+++ branches/SAMBA_3_0/source/smbd/open.c	2006-07-19 05:32:12 UTC (rev 17131)
@@ -245,7 +245,7 @@
 	}
 
 	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) ) {
 
 		/*



More information about the samba-cvs mailing list