From: Jeremy Allison Date: Thu, 13 May 2010 18:33:02 +0000 (-0700) Subject: Be more forgiving on client oplock break failure (as Windows does). Remove a global. X-Git-Tag: samba-3.6.0pre1~2027 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=895b99fd6bfb1a65c3ae408bdf381e66783ac385;p=thirdparty%2Fsamba.git Be more forgiving on client oplock break failure (as Windows does). Remove a global. Jeremy. --- diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index f7d6e0700f9..ac3c5b2024c 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -591,7 +591,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, } /* Ignore oplock requests if oplocks are disabled. */ - if (!lp_oplocks(SNUM(conn)) || global_client_failed_oplock_break || + if (!lp_oplocks(SNUM(conn)) || IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) { /* Mask off everything except the private Samba bits. */ oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK; diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c index 38ba1a4d793..10ee5e81e28 100644 --- a/source3/smbd/globals.c +++ b/source3/smbd/globals.c @@ -112,7 +112,6 @@ char *sparse_buf = NULL; /* Current number of oplocks we have outstanding. */ int32_t exclusive_oplocks_open = 0; int32_t level_II_oplocks_open = 0; -bool global_client_failed_oplock_break = false; struct kernel_oplocks *koplocks = NULL; int am_parent = 1; diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 113e343c3ee..ad175bc4209 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -122,7 +122,6 @@ extern char *sparse_buf; /* Current number of oplocks we have outstanding. */ extern int32_t exclusive_oplocks_open; extern int32_t level_II_oplocks_open; -extern bool global_client_failed_oplock_break; extern struct kernel_oplocks *koplocks; extern int am_parent; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 049ce222ada..ce69157df57 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1593,7 +1593,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } /* ignore any oplock requests if oplocks are disabled */ - if (!lp_oplocks(SNUM(conn)) || global_client_failed_oplock_break || + if (!lp_oplocks(SNUM(conn)) || IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) { /* Mask off everything except the private Samba bits. */ oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK; diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 1ff1737a3f7..a6702a55953 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -320,10 +320,6 @@ static void oplock_timeout_handler(struct event_context *ctx, TALLOC_FREE(fsp->oplock_timeout); DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp_str_dbg(fsp))); - /* Only set this for SMB1.. */ - if (!smbd_server_conn->allow_smb2) { - global_client_failed_oplock_break = True; - } remove_oplock(fsp); reply_to_oplock_break_requests(fsp); } diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c index 3811211088d..9c6287ba342 100644 --- a/source3/smbd/oplock_onefs.c +++ b/source3/smbd/oplock_onefs.c @@ -380,7 +380,6 @@ static void oplock_revoked_handler(uint64_t id) DEBUG(0,("Level 1 oplock break failed for file %s. Forcefully " "revoking oplock\n", fsp_str_dbg(fsp))); - global_client_failed_oplock_break = True; remove_oplock(fsp); /*