summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-04 17:26:30 +0200
committerJeremy Allison <jra@samba.org>2013-09-06 00:47:07 +0200
commit196da5925b6263b616149f8c4c8d67e1572dea4f (patch)
treefeeca0c2deed1becd6252d911ebee5872896aad7 /source3/smbd/open.c
parent778636920b5194b101ce64956ef44c84a785145c (diff)
downloadsamba-196da5925b6263b616149f8c4c8d67e1572dea4f.tar.gz
samba-196da5925b6263b616149f8c4c8d67e1572dea4f.tar.bz2
samba-196da5925b6263b616149f8c4c8d67e1572dea4f.zip
smbd: Remove FORCE_OPLOCK_BREAK_TO_NONE
This flag existed to break an exclusive or batch oplock in just one instead of two steps down to "no oplock" when we did an allocation or file size change. Running raw.oplock against W2k12 differs in this respect from W2k3: W2k12 takes two steps (via level2) to break to none. This removes the special flag that we only had for compatibility with systems older than W2k12... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 6 00:47:07 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index c28d2a39fa..f4210d7417 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1184,14 +1184,6 @@ static NTSTATUS send_break_message(files_struct *fsp,
/* Create the message. */
share_mode_entry_to_message(msg, exclusive);
- /* Add in the FORCE_OPLOCK_BREAK_TO_NONE bit in the message if set. We
- don't want this set in the share mode struct pointed to by lck. */
-
- if (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE) {
- SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET,
- exclusive->op_type | FORCE_OPLOCK_BREAK_TO_NONE);
- }
-
status = messaging_send_buf(fsp->conn->sconn->msg_ctx, exclusive->pid,
MSG_SMB_BREAK_REQUEST,
(uint8 *)msg,
@@ -1914,10 +1906,7 @@ static int calculate_open_access_flags(uint32_t access_mask,
* mean the same thing under DOS and Unix.
*/
- need_write =
- ((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ||
- (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE));
-
+ need_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA));
if (!need_write) {
return O_RDONLY;
}
@@ -2181,7 +2170,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
open_access_mask = access_mask;
- if ((flags2 & O_TRUNC) || (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE)) {
+ if (flags2 & O_TRUNC) {
open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */
}