]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Introduce share_mode_have_entries()
authorVolker Lendecke <vl@samba.org>
Tue, 17 Dec 2019 13:20:48 +0000 (14:20 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 17 Dec 2019 22:40:32 +0000 (22:40 +0000)
This hides a use of share_mode_data->num_share_modes in
share_mode_lock.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/proto.h
source3/locking/share_mode_lock.c

index dfbd59ede0c36fb6de6eb1f56873eb9ece64e223..b7098c1e788ca475abb134ac5b504522fa486487 100644 (file)
@@ -149,6 +149,7 @@ NTSTATUS share_mode_do_locked(
                   void *private_data),
        void *private_data);
 NTSTATUS share_mode_wakeup_waiters(struct file_id id);
+bool share_mode_have_entries(struct share_mode_lock *lck);
 
 struct tevent_req *share_mode_watch_send(
        TALLOC_CTX *mem_ctx,
index 842d7d5df0c060d9ea7978d90c9064cf78036137..66132e5d3bbfc473e3759034a6cf4b7600df3aa2 100644 (file)
@@ -805,6 +805,11 @@ NTSTATUS share_mode_wakeup_waiters(struct file_id id)
        return share_mode_do_locked(id, share_mode_wakeup_waiters_fn, NULL);
 }
 
+bool share_mode_have_entries(struct share_mode_lock *lck)
+{
+       return (lck->data->num_share_modes != 0);
+}
+
 struct share_mode_watch_state {
        struct tevent_context *ev;
        bool blockerdead;