The branch, master has been updated
       via  085c7a7 smbd: do_lock_cancel does not need "blr" anymore
       via  5a1fb2e smbd: brl_lock_cancel does not need "blr" anymore
       via  6f8fd3d smbd: Remove unused blocking_lock_record* from 
VFS_BRL_CANCEL_WINDOWS
       via  f038cf7 smbd: do_lock does not need "blr" anymore
       via  c886e66 smbd: brl_lock does not need "blr" anymore
       via  b08fe2d smbd: Remove unused blocking_lock_record* from 
VFS_BRL_LOCK_WINDOWS
       via  e2233fb smbd: Remove two outdated comments
       via  28df2b0 smbd: Use brl_delete_lock_struct in brl_lock_cancel_default
       via  f93ae07 smbd: Factor out unlocking from smbd_do_locking
       via  27ef395 smbd: Remove an outdated comment
      from  f371032 s4-winbind: Use winbindd in the AD DC by default

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 085c7a71fde37cb2a67a4c67673cd22f8acf0861
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 14:10:22 2014 +0000

    smbd: do_lock_cancel does not need "blr" anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Fri Jul  4 08:52:31 CEST 2014 on sn-devel-104

commit 5a1fb2eb0dc849bba5f74ef874d7629cd611929f
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 14:03:12 2014 +0000

    smbd: brl_lock_cancel does not need "blr" anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 6f8fd3d5ab206838a70bdcbfc3386dc668676d70
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 13:51:45 2014 +0000

    smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWS
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit f038cf739dc5613b10ffbd3c0434c5b729768ad2
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 14:08:26 2014 +0000

    smbd: do_lock does not need "blr" anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit c886e66232a264fd41db507f853c74e1d82858be
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 14:05:03 2014 +0000

    smbd: brl_lock does not need "blr" anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit b08fe2d98d65c4c389ac8771c91d907958490f4f
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 13:51:45 2014 +0000

    smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWS
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit e2233fbcee542ccd9bb45ace8d6ae2f6d783c9a1
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 10:30:56 2014 +0000

    smbd: Remove two outdated comments
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 28df2b0d0dc969d6fa7a462cce704b75c95136f9
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 10:18:36 2014 +0000

    smbd: Use brl_delete_lock_struct in brl_lock_cancel_default
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit f93ae07679877834a27fbcb936b49efd59c6b0c2
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 10:06:56 2014 +0000

    smbd: Factor out unlocking from smbd_do_locking
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 27ef39577153bcfe7e7072383657422666f93dbd
Author: Volker Lendecke <[email protected]>
Date:   Thu Jul 3 09:37:10 2014 +0000

    smbd: Remove an outdated comment
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 examples/VFS/skel_opaque.c       |    6 +--
 examples/VFS/skel_transparent.c  |   10 ++--
 source3/include/vfs.h            |   12 ++---
 source3/include/vfs_macros.h     |   16 +++---
 source3/locking/brlock.c         |   27 +++-------
 source3/locking/locking.c        |   12 ++---
 source3/locking/proto.h          |   12 ++---
 source3/modules/vfs_default.c    |    6 +--
 source3/modules/vfs_full_audit.c |   10 ++--
 source3/modules/vfs_time_audit.c |   10 ++--
 source3/smbd/blocking.c          |   28 +++--------
 source3/smbd/globals.h           |    6 ++-
 source3/smbd/reply.c             |  101 ++++++++++++++++++++-----------------
 source3/smbd/smb2_lock.c         |   25 +++-------
 source3/smbd/trans2.c            |    3 +-
 15 files changed, 120 insertions(+), 164 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5abea20..724dd7b 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -574,8 +574,7 @@ static const char *skel_connectpath(struct 
vfs_handle_struct *handle,
 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
                                      struct byte_range_lock *br_lck,
                                      struct lock_struct *plock,
-                                     bool blocking_lock,
-                                     struct blocking_lock_record *blr)
+                                     bool blocking_lock)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
 }
@@ -591,8 +590,7 @@ static bool skel_brl_unlock_windows(struct 
vfs_handle_struct *handle,
 
 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
                                    struct byte_range_lock *br_lck,
-                                   struct lock_struct *plock,
-                                   struct blocking_lock_record *blr)
+                                   struct lock_struct *plock)
 {
        errno = ENOSYS;
        return false;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f042b2a..329b016 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -694,11 +694,10 @@ static const char *skel_connectpath(struct 
vfs_handle_struct *handle,
 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
                                      struct byte_range_lock *br_lck,
                                      struct lock_struct *plock,
-                                     bool blocking_lock,
-                                     struct blocking_lock_record *blr)
+                                     bool blocking_lock)
 {
        return SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle,
-                                            br_lck, plock, blocking_lock, blr);
+                                            br_lck, plock, blocking_lock);
 }
 
 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
@@ -711,10 +710,9 @@ static bool skel_brl_unlock_windows(struct 
vfs_handle_struct *handle,
 
 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
                                    struct byte_range_lock *br_lck,
-                                   struct lock_struct *plock,
-                                   struct blocking_lock_record *blr)
+                                   struct lock_struct *plock)
 {
-       return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr);
+       return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
 }
 
 static bool skel_strict_lock(struct vfs_handle_struct *handle,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 1bea0b8..474b1e3 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -656,8 +656,7 @@ struct vfs_fn_pointers {
        NTSTATUS (*brl_lock_windows_fn)(struct vfs_handle_struct *handle,
                                        struct byte_range_lock *br_lck,
                                        struct lock_struct *plock,
-                                       bool blocking_lock,
-                                       struct blocking_lock_record *blr);
+                                       bool blocking_lock);
 
        bool (*brl_unlock_windows_fn)(struct vfs_handle_struct *handle,
                                      struct messaging_context *msg_ctx,
@@ -666,8 +665,7 @@ struct vfs_fn_pointers {
 
        bool (*brl_cancel_windows_fn)(struct vfs_handle_struct *handle,
                                      struct byte_range_lock *br_lck,
-                                     struct lock_struct *plock,
-                                     struct blocking_lock_record *blr);
+                                     struct lock_struct *plock);
 
        bool (*strict_lock_fn)(struct vfs_handle_struct *handle,
                               struct files_struct *fsp,
@@ -1077,16 +1075,14 @@ const char *smb_vfs_call_connectpath(struct 
vfs_handle_struct *handle,
 NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle,
                                       struct byte_range_lock *br_lck,
                                       struct lock_struct *plock,
-                                      bool blocking_lock,
-                                      struct blocking_lock_record *blr);
+                                      bool blocking_lock);
 bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle,
                                     struct messaging_context *msg_ctx,
                                     struct byte_range_lock *br_lck,
                                     const struct lock_struct *plock);
 bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
                                     struct byte_range_lock *br_lck,
-                                    struct lock_struct *plock,
-                                    struct blocking_lock_record *blr);
+                                    struct lock_struct *plock);
 bool smb_vfs_call_strict_lock(struct vfs_handle_struct *handle,
                              struct files_struct *fsp,
                              struct lock_struct *plock);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 0f44c62..de9f55f 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -364,20 +364,20 @@
 #define SMB_VFS_NEXT_CONNECTPATH(conn, fname) \
        smb_vfs_call_connectpath((conn)->next, (fname))
 
-#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) \
-       smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock), 
(blocking_lock), (blr))
-#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, 
blr) \
-       smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock), 
(blocking_lock), (blr))
+#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock) \
+       smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock), 
(blocking_lock))
+#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock) \
+       smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock), 
(blocking_lock))
 
 #define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) \
        smb_vfs_call_brl_unlock_windows((conn)->vfs_handles, (msg_ctx), 
(br_lck), (plock))
 #define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) \
        smb_vfs_call_brl_unlock_windows((handle)->next, (msg_ctx), (br_lck), 
(plock))
 
-#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) \
-       smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock), 
(blr))
-#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr) \
-       smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock), 
(blr))
+#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock) \
+       smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock))
+#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock) \
+       smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock))
 
 #define SMB_VFS_STRICT_LOCK(conn, fsp, plock) \
        smb_vfs_call_strict_lock((conn)->vfs_handles, (fsp), (plock))
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 2ab7092..be90b2b 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -933,12 +933,11 @@ static NTSTATUS brl_lock_posix(struct messaging_context 
*msg_ctx,
 NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle,
                                       struct byte_range_lock *br_lck,
                                       struct lock_struct *plock,
-                                      bool blocking_lock,
-                                      struct blocking_lock_record *blr)
+                                      bool blocking_lock)
 {
        VFS_FIND(brl_lock_windows);
        return handle->fns->brl_lock_windows_fn(handle, br_lck, plock,
-                                               blocking_lock, blr);
+                                               blocking_lock);
 }
 
 /****************************************************************************
@@ -954,8 +953,7 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
                enum brl_type lock_type,
                enum brl_flavour lock_flav,
                bool blocking_lock,
-               uint64_t *psmblctx,
-               struct blocking_lock_record *blr)
+               uint64_t *psmblctx)
 {
        NTSTATUS ret;
        struct lock_struct lock;
@@ -982,7 +980,7 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
 
        if (lock_flav == WINDOWS_LOCK) {
                ret = SMB_VFS_BRL_LOCK_WINDOWS(br_lck->fsp->conn, br_lck,
-                   &lock, blocking_lock, blr);
+                                              &lock, blocking_lock);
        } else {
                ret = brl_lock_posix(msg_ctx, br_lck, &lock);
        }
@@ -1442,11 +1440,10 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
 
 bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
                                     struct byte_range_lock *br_lck,
-                                    struct lock_struct *plock,
-                                    struct blocking_lock_record *blr)
+                                    struct lock_struct *plock)
 {
        VFS_FIND(brl_cancel_windows);
-       return handle->fns->brl_cancel_windows_fn(handle, br_lck, plock, blr);
+       return handle->fns->brl_cancel_windows_fn(handle, br_lck, plock);
 }
 
 /****************************************************************************
@@ -1457,8 +1454,7 @@ bool brl_lock_cancel(struct byte_range_lock *br_lck,
                struct server_id pid,
                br_off start,
                br_off size,
-               enum brl_flavour lock_flav,
-               struct blocking_lock_record *blr)
+               enum brl_flavour lock_flav)
 {
        bool ret;
        struct lock_struct lock;
@@ -1474,7 +1470,7 @@ bool brl_lock_cancel(struct byte_range_lock *br_lck,
 
        if (lock_flav == WINDOWS_LOCK) {
                ret = SMB_VFS_BRL_CANCEL_WINDOWS(br_lck->fsp->conn, br_lck,
-                   &lock, blr);
+                                                &lock);
        } else {
                ret = brl_lock_cancel_default(br_lck, &lock);
        }
@@ -1509,12 +1505,7 @@ bool brl_lock_cancel_default(struct byte_range_lock 
*br_lck,
                return False;
        }
 
-       if (i < br_lck->num_locks - 1) {
-               /* Found this particular pending lock - delete it */
-               memmove(&locks[i], &locks[i+1],
-                       sizeof(*locks)*((br_lck->num_locks-1) - i));
-       }
-
+       brl_delete_lock_struct(locks, br_lck->num_locks, i);
        br_lck->num_locks -= 1;
        br_lck->modified = True;
        return True;
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index b3f65ee..02c8815 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -243,8 +243,7 @@ struct byte_range_lock *do_lock(struct messaging_context 
*msg_ctx,
                        enum brl_flavour lock_flav,
                        bool blocking_lock,
                        NTSTATUS *perr,
-                       uint64_t *psmblctx,
-                       struct blocking_lock_record *blr)
+                       uint64_t *psmblctx)
 {
        struct byte_range_lock *br_lck = NULL;
 
@@ -287,8 +286,7 @@ struct byte_range_lock *do_lock(struct messaging_context 
*msg_ctx,
                        lock_type,
                        lock_flav,
                        blocking_lock,
-                       psmblctx,
-                       blr);
+                       psmblctx);
 
        DEBUG(10, ("do_lock: returning status=%s\n", nt_errstr(*perr)));
 
@@ -354,8 +352,7 @@ NTSTATUS do_lock_cancel(files_struct *fsp,
                        uint64 smblctx,
                        uint64_t count,
                        uint64_t offset,
-                       enum brl_flavour lock_flav,
-                       struct blocking_lock_record *blr)
+                       enum brl_flavour lock_flav)
 {
        bool ok = False;
        struct byte_range_lock *br_lck = NULL;
@@ -383,8 +380,7 @@ NTSTATUS do_lock_cancel(files_struct *fsp,
                        messaging_server_id(fsp->conn->sconn->msg_ctx),
                        offset,
                        count,
-                       lock_flav,
-                       blr);
+                       lock_flav);
 
        TALLOC_FREE(br_lck);
 
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index dc115e1..3db9e7a 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -47,8 +47,7 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
                enum brl_type lock_type,
                enum brl_flavour lock_flav,
                bool blocking_lock,
-               uint64_t *psmblctx,
-               struct blocking_lock_record *blr);
+               uint64_t *psmblctx);
 bool brl_unlock(struct messaging_context *msg_ctx,
                struct byte_range_lock *br_lck,
                uint64_t smblctx,
@@ -78,8 +77,7 @@ bool brl_lock_cancel(struct byte_range_lock *br_lck,
                struct server_id pid,
                br_off start,
                br_off size,
-               enum brl_flavour lock_flav,
-               struct blocking_lock_record *blr);
+               enum brl_flavour lock_flav);
 bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
                struct lock_struct *plock);
 bool brl_mark_disconnected(struct files_struct *fsp);
@@ -131,8 +129,7 @@ struct byte_range_lock *do_lock(struct messaging_context 
*msg_ctx,
                        enum brl_flavour lock_flav,
                        bool blocking_lock,
                        NTSTATUS *perr,
-                       uint64_t *psmblctx,
-                       struct blocking_lock_record *blr);
+                       uint64_t *psmblctx);
 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        uint64_t smblctx,
@@ -143,8 +140,7 @@ NTSTATUS do_lock_cancel(files_struct *fsp,
                        uint64 smblctx,
                        uint64_t count,
                        uint64_t offset,
-                       enum brl_flavour lock_flav,
-                       struct blocking_lock_record *blr);
+                       enum brl_flavour lock_flav);
 void locking_close_file(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        enum file_close_type close_type);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 0695357..78c249d 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2205,8 +2205,7 @@ static const char *vfswrap_connectpath(struct 
vfs_handle_struct *handle,
 static NTSTATUS vfswrap_brl_lock_windows(struct vfs_handle_struct *handle,
                                         struct byte_range_lock *br_lck,
                                         struct lock_struct *plock,
-                                        bool blocking_lock,
-                                        struct blocking_lock_record *blr)
+                                        bool blocking_lock)
 {
        SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);
 
@@ -2226,8 +2225,7 @@ static bool vfswrap_brl_unlock_windows(struct 
vfs_handle_struct *handle,
 
 static bool vfswrap_brl_cancel_windows(struct vfs_handle_struct *handle,
                                       struct byte_range_lock *br_lck,
-                                      struct lock_struct *plock,
-                                      struct blocking_lock_record *blr)
+                                      struct lock_struct *plock)
 {
        SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);
 
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 99e3fcb..262b241 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1650,13 +1650,12 @@ static const char 
*smb_full_audit_connectpath(vfs_handle_struct *handle,
 static NTSTATUS smb_full_audit_brl_lock_windows(struct vfs_handle_struct 
*handle,
                                                struct byte_range_lock *br_lck,
                                                struct lock_struct *plock,
-                                               bool blocking_lock,
-                                               struct blocking_lock_record 
*blr)
+                                               bool blocking_lock)
 {
        NTSTATUS result;
 
        result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock,
-           blocking_lock, blr);
+                                              blocking_lock);
 
        do_log(SMB_VFS_OP_BRL_LOCK_WINDOWS, NT_STATUS_IS_OK(result), handle,
            "%s:%llu-%llu. type=%d. blocking=%d",
@@ -1686,12 +1685,11 @@ static bool smb_full_audit_brl_unlock_windows(struct 
vfs_handle_struct *handle,
 
 static bool smb_full_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
                                              struct byte_range_lock *br_lck,
-                                             struct lock_struct *plock,
-                                             struct blocking_lock_record *blr)
+                                             struct lock_struct *plock)
 {
        bool result;
 
-       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr);
+       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
 
        do_log(SMB_VFS_OP_BRL_CANCEL_WINDOWS, (result == 0), handle,
               "%s:%llu-%llu:%d", fsp_str_do_log(brl_fsp(br_lck)),
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index a70c8ca..3a45ecd 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1543,8 +1543,7 @@ static const char 
*smb_time_audit_connectpath(vfs_handle_struct *handle,
 static NTSTATUS smb_time_audit_brl_lock_windows(struct vfs_handle_struct 
*handle,
                                                struct byte_range_lock *br_lck,
                                                struct lock_struct *plock,
-                                               bool blocking_lock,
-                                               struct blocking_lock_record 
*blr)
+                                               bool blocking_lock)
 {
        NTSTATUS result;
        struct timespec ts1,ts2;
@@ -1552,7 +1551,7 @@ static NTSTATUS smb_time_audit_brl_lock_windows(struct 
vfs_handle_struct *handle
 
        clock_gettime_mono(&ts1);
        result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock,
-                                              blocking_lock, blr);
+                                              blocking_lock);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
@@ -1589,15 +1588,14 @@ static bool smb_time_audit_brl_unlock_windows(struct 
vfs_handle_struct *handle,
 
 static bool smb_time_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
                                              struct byte_range_lock *br_lck,
-                                             struct lock_struct *plock,
-                                             struct blocking_lock_record *blr)
+                                             struct lock_struct *plock)
 {
        bool result;
        struct timespec ts1,ts2;
        double timediff;
 
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr);
+       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index fdb90a1..47ac4cc 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -25,10 +25,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_LOCKING
 
-/****************************************************************************
- Determine if this is a secondary element of a chained SMB.
-  **************************************************************************/
-
 static void received_unlock_msg(struct messaging_context *msg,
                                void *private_data,
                                uint32_t msg_type,
@@ -231,8 +227,7 @@ bool push_blocking_lock_request( struct byte_range_lock 
*br_lck,
                        lock_type == READ_LOCK ? PENDING_READ_LOCK : 
PENDING_WRITE_LOCK,
                        blr->lock_flav,
                        True,
-                       NULL,
-                       blr);
+                       NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("push_blocking_lock_request: failed to add 
PENDING_LOCK record.\n"));
@@ -500,8 +495,7 @@ static bool process_lockingX(struct blocking_lock_record 
*blr)
                                WINDOWS_LOCK,
                                True,
                                &status,
-                               &blr->blocking_smblctx,
-                               blr);
+                               &blr->blocking_smblctx);
 
                if (ERROR_WAS_LOCK_DENIED(status) && !lock_timeout) {
                        /*
@@ -522,8 +516,7 @@ static bool process_lockingX(struct blocking_lock_record 
*blr)
                                                PENDING_WRITE_LOCK,
                                                blr->lock_flav,
                                        true, /* Blocking lock. */
-                                       NULL,
-                                       blr);
+                                       NULL);
 
                        if (!NT_STATUS_IS_OK(status1)) {
                                DEBUG(0,("failed to add PENDING_LOCK "
@@ -602,8 +595,7 @@ static bool process_trans2(struct blocking_lock_record *blr)
                                                blr->lock_flav,
                                                True,
                                                &status,
-                                               &blr->blocking_smblctx,
-                                               blr);
+                                               &blr->blocking_smblctx);
        if (ERROR_WAS_LOCK_DENIED(status) && !lock_timeout) {
                /*
                 * If we didn't timeout, but still need to wait,
@@ -623,8 +615,7 @@ static bool process_trans2(struct blocking_lock_record *blr)
                                        PENDING_WRITE_LOCK,
                                blr->lock_flav,
                                true, /* Blocking lock. */
-                               NULL,
-                               blr);
+                               NULL);
 
                if (!NT_STATUS_IS_OK(status1)) {
                        DEBUG(0,("failed to add PENDING_LOCK record.\n"));
@@ -734,8 +725,7 @@ void smbd_cancel_pending_lock_requests_by_fid(files_struct 
*fsp,
                                messaging_server_id(sconn->msg_ctx),
                                blr->offset,
                                blr->count,
-                               blr->lock_flav,
-                               blr);
+                               blr->lock_flav);
 
                /* We're closing the file fsp here, so ensure
                 * we don't have a dangling pointer. */
@@ -777,8 +767,7 @@ void remove_pending_lock_requests_by_mid_smb1(
                                        messaging_server_id(sconn->msg_ctx),
                                        blr->offset,
                                        blr->count,
-                                       blr->lock_flav,
-                                       blr);
+                                       blr->lock_flav);
                        TALLOC_FREE(br_lck);
                }
 
@@ -876,8 +865,7 @@ void process_blocking_lock_queue(struct 
smbd_server_connection *sconn)
                                messaging_server_id(sconn->msg_ctx),
                                blr->offset,
                                blr->count,
-                               blr->lock_flav,
-                               blr);
+                               blr->lock_flav);
                }
                TALLOC_FREE(br_lck);
 
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h


-- 
Samba Shared Repository

Reply via email to