Be more forgiving on client oplock break failure (as Windows does). Remove a global.
authorJeremy Allison <jra@samba.org>
Thu, 13 May 2010 18:33:02 +0000 (11:33 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 13 May 2010 18:33:02 +0000 (11:33 -0700)
Jeremy.

source3/modules/onefs_open.c
source3/smbd/globals.c
source3/smbd/globals.h
source3/smbd/open.c
source3/smbd/oplock.c
source3/smbd/oplock_onefs.c

index f7d6e0700f93d222196c26d0e4a53e8db1f51325..ac3c5b2024c7360580c7a6795dbffe3c1144b20d 100644 (file)
@@ -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;
index 38ba1a4d7931d69bccf9a44b89d765b82e72d71e..10ee5e81e28138e50c7b524ce460d254e93fa822 100644 (file)
@@ -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;
index 113e343c3eeb92d48606107438d1bbb8cc56e059..ad175bc4209100a231392efe94b33af810ad1c6e 100644 (file)
@@ -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;
index 049ce222adad500b182603e7d5cc5232d8b08436..ce69157df5741063400a8d6dfafac21e9ded7750 100644 (file)
@@ -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;
index 1ff1737a3f70bca4a2a80a65a25d348ce606a39e..a6702a55953924685aae9363b6926b0f72449502 100644 (file)
@@ -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);
 }
index 3811211088d62ca1919ef81707857d277e3e492f..9c6287ba342651d2e3138b96a33ecc70489c8ea2 100644 (file)
@@ -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);
 
        /*