s3: Explicitly pass sconn to process_blocking_lock_queue
authorVolker Lendecke <vl@samba.org>
Sat, 12 Jun 2010 12:31:04 +0000 (14:31 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 12 Jun 2010 13:42:56 +0000 (15:42 +0200)
source3/include/proto.h
source3/modules/onefs_cbrl.c
source3/smbd/blocking.c

index 13682f33685f627d4184f763d64f1281eb818330..2b2754c16f81b1dd81e62a8e52a6123fce92d748 100644 (file)
@@ -5355,7 +5355,7 @@ void brl_timeout_fn(struct event_context *event_ctx,
                void *private_data);
 struct timeval timeval_brl_min(const struct timeval *tv1,
                        const struct timeval *tv2);
-void process_blocking_lock_queue(void);
+void process_blocking_lock_queue(struct smbd_server_connection *sconn);
 bool push_blocking_lock_request( struct byte_range_lock *br_lck,
                struct smb_request *req,
                files_struct *fsp,
index 4b0600b35ce24759cea4d2d3aa97f49756b01358..33f35a7f34d87eceb166eadb049b5ee4d22e5690 100644 (file)
@@ -184,7 +184,7 @@ static void onefs_cbrl_async_success(uint64_t id)
            LEVEL2_CONTEND_WINDOWS_BRL);
 
        /* Process the queue, to try the next lock or finish up. */
-       process_blocking_lock_queue();
+       process_blocking_lock_queue(smbd_server_conn);
 }
 
 static void onefs_cbrl_async_failure(uint64_t id)
@@ -207,7 +207,7 @@ static void onefs_cbrl_async_failure(uint64_t id)
 
        /* Process the queue. It will end up trying to retake the same lock,
         * see the error in onefs_cbrl_lock_windows() and fail. */
-       process_blocking_lock_queue();
+       process_blocking_lock_queue(smbd_server_conn);
 }
 
 static struct cbrl_event_ops cbrl_ops =
index ea271784a37b56456639b7229ccd3c56f8972568..0c4e5ce80391be4fd9ce53f5bc686d8ed65ca0e3 100644 (file)
@@ -53,7 +53,7 @@ void brl_timeout_fn(struct event_context *event_ctx,
        change_to_root_user();  /* TODO: Possibly run all timed events as
                                 * root */
 
-       process_blocking_lock_queue();
+       process_blocking_lock_queue(sconn);
 }
 
 /****************************************************************************
@@ -701,16 +701,15 @@ static void received_unlock_msg(struct messaging_context *msg,
                                DATA_BLOB *data)
 {
        DEBUG(10,("received_unlock_msg\n"));
-       process_blocking_lock_queue();
+       process_blocking_lock_queue(smbd_server_conn);
 }
 
 /****************************************************************************
  Process the blocking lock queue. Note that this is only called as root.
 *****************************************************************************/
 
-void process_blocking_lock_queue(void)
+void process_blocking_lock_queue(struct smbd_server_connection *sconn)
 {
-       struct smbd_server_connection *sconn = smbd_server_conn;
        struct timeval tv_curr = timeval_current();
        struct blocking_lock_record *blr, *next = NULL;