diff options
author | Volker Lendecke <vl@samba.org> | 2013-10-24 20:53:36 +0200 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2013-10-25 14:22:20 +0200 |
commit | ef4054eb88df7b4809c4cbe99b65a0e0efcd78c4 (patch) | |
tree | 925cc56568dc4288acab663facb8b3c6e5a9732e /source3 | |
parent | 4378db981904fbd7c4b4a0bc2cf4b6eb1f6b424b (diff) | |
download | samba-ef4054eb88df7b4809c4cbe99b65a0e0efcd78c4.tar.gz samba-ef4054eb88df7b4809c4cbe99b65a0e0efcd78c4.tar.bz2 samba-ef4054eb88df7b4809c4cbe99b65a0e0efcd78c4.zip |
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@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Oct 25 14:22:20 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/open.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 28c2c1c844..4db673acd3 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*..... */ @@ -2671,7 +2680,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, if (file_existed) { /* stat opens on existing files don't get oplocks. */ if (is_stat_open(open_access_mask)) { - oplock_request = NO_OPLOCK; + fsp->oplock_type = NO_OPLOCK; } } @@ -2694,8 +2703,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * file structs. */ - grant_fsp_oplock_type(fsp, lck, oplock_request); - status = set_file_oplock(fsp); if (!NT_STATUS_IS_OK(status)) { /* |