diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/locking/brlock.c | 5 | ||||
-rw-r--r-- | source3/locking/proto.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 | ||||
-rw-r--r-- | source3/smbd/open.c | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 2e08ce64ef..0639649576 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -63,6 +63,11 @@ static void print_lock_struct(unsigned int i, const struct lock_struct *pls) lock_flav_name(pls->lock_flav) )); } +unsigned int brl_num_locks(const struct byte_range_lock *brl) +{ + return brl->num_locks; +} + /**************************************************************************** See if two locking contexts are equal. ****************************************************************************/ diff --git a/source3/locking/proto.h b/source3/locking/proto.h index a51c5a204c..f5137f97d2 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -28,6 +28,8 @@ void brl_init(bool read_only); void brl_shutdown(void); +unsigned int brl_num_locks(const struct byte_range_lock *brl); + NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck, struct lock_struct *plock, bool blocking_lock); diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 3d4ee22ea1..22737e858c 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -106,7 +106,7 @@ static void enum_file_fn( const struct share_mode_entry *e, fsp.file_id = e->id; if ( (brl = brl_get_locks(talloc_tos(), &fsp)) != NULL ) { - num_locks = brl->num_locks; + num_locks = brl_num_locks(brl); TALLOC_FREE(brl); } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index b9618b41dc..1a86233fd9 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1368,7 +1368,7 @@ static bool file_has_brlocks(files_struct *fsp) if (!br_lck) return false; - return (br_lck->num_locks > 0); + return (brl_num_locks(br_lck) > 0); } static void grant_fsp_oplock_type(files_struct *fsp, |