diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-08-09 00:47:39 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-09-09 14:23:39 +0000 |
commit | bd8884e5722cbbb7783fb4ae53e4f35b31031b01 (patch) | |
tree | 5ac674fe3b3498734d406df6ed906290124d3ba8 /source3/locking | |
parent | 0e5613e39d6c6bb892fed939c63b4f14b878803b (diff) | |
download | samba-bd8884e5722cbbb7783fb4ae53e4f35b31031b01.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>
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 a2363ebdb8f..847d95b0cfa 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 5c997bd61a0..fada7e5691e 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; |