[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Fri Oct 25 06:23:02 MDT 2013


The branch, master has been updated
       via  ef4054e Revert "smbd: Move oplock/sharemode ops into one place"
       via  4378db9 Revert "smbd: Move oplock handling together"
      from  319c2d7 waf: parse LDFLAGS from python

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ef4054eb88df7b4809c4cbe99b65a0e0efcd78c4
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Oct 24 20:53:36 2013 +0200

    Revert "smbd: Move oplock/sharemode ops into one place"
    
    This reverts commit 7b70fa18734d9ceb020fe3e5d4cc0c26cd27a484.
    
    This is a change in behaviour which needs much further investigation
    and testing.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Fri Oct 25 14:22:20 CEST 2013 on sn-devel-104

commit 4378db981904fbd7c4b4a0bc2cf4b6eb1f6b424b
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Oct 24 20:53:32 2013 +0200

    Revert "smbd: Move oplock handling together"
    
    This reverts commit e689b7d51e6ffd848ab10e160dca2c3a03fc750b.
    
    This is a change in behaviour which needs much further investigation
    and testing.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/open.c |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8ae2246..4db673a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1435,6 +1435,13 @@ static void grant_fsp_oplock_type(files_struct *fsp,
 		fsp->oplock_type = NO_OPLOCK;
 	}
 
+	if (is_stat_open(fsp->access_mask)) {
+		/* Leave the value already set. */
+		DEBUG(10,("grant_fsp_oplock_type: oplock type 0x%x on file %s\n",
+			fsp->oplock_type, fsp_str_dbg(fsp)));
+		return;
+	}
+
 	got_level2_oplock = false;
 	got_a_none_oplock = false;
 
@@ -2610,6 +2617,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
 		return status;
 	}
 
+	grant_fsp_oplock_type(fsp, lck, oplock_request);
+
 	/*
 	 * We have the share entry *locked*.....
 	 */
@@ -2668,6 +2677,13 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
 		fsp->access_mask = access_mask | FILE_READ_ATTRIBUTES;
 	}
 
+	if (file_existed) {
+		/* stat opens on existing files don't get oplocks. */
+		if (is_stat_open(open_access_mask)) {
+			fsp->oplock_type = NO_OPLOCK;
+		}
+	}
+
 	if (new_file_created) {
 		info = FILE_WAS_CREATED;
 	} else {
@@ -2687,15 +2703,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
 	 * file structs.
 	 */
 
-	if (file_existed) {
-		/* stat opens on existing files don't get oplocks. */
-		if (is_stat_open(open_access_mask)) {
-			oplock_request = NO_OPLOCK;
-		}
-	}
-
-	grant_fsp_oplock_type(fsp, lck, oplock_request);
-
 	status = set_file_oplock(fsp);
 	if (!NT_STATUS_IS_OK(status)) {
 		/*


-- 
Samba Shared Repository


More information about the samba-cvs mailing list