diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-08-09 00:47:39 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-09-09 16:04:28 +0000 |
commit | f73b670b4db103069aa151d3af4ed7a92ce581c3 (patch) | |
tree | ba3c1dbcd56088b19629f02c103ee86d728a0936 /source3/locking | |
parent | 244ad1210cc29ede25fb8692bae46aab7d6725ac (diff) | |
download | samba-f73b670b4db103069aa151d3af4ed7a92ce581c3.tar.gz |
s3:locking: add share_mode_wakeup_waiters() helper function
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit bd8884e5722cbbb7783fb4ae53e4f35b31031b01)
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/proto.h | 1 | ||||
-rw-r--r-- | source3/locking/share_mode_lock.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/locking/proto.h b/source3/locking/proto.h index 2487fa5d14d..7cb8bf3e3c9 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -138,6 +138,7 @@ NTSTATUS share_mode_do_locked( bool *modified_dependent, void *private_data), void *private_data); +NTSTATUS share_mode_wakeup_waiters(struct file_id id); struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx, struct file_id id); diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 430d14fab4a..372e188c1c0 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -771,6 +771,18 @@ NTSTATUS share_mode_do_locked( return NT_STATUS_OK; } +static void share_mode_wakeup_waiters_fn(struct db_record *rec, + bool *modified_dependent, + void *private_data) +{ + *modified_dependent = true; +} + +NTSTATUS share_mode_wakeup_waiters(struct file_id id) +{ + return share_mode_do_locked(id, share_mode_wakeup_waiters_fn, NULL); +} + struct fetch_share_mode_unlocked_state { TALLOC_CTX *mem_ctx; struct share_mode_lock *lck; |