From f37c14dd63285e108a9fc1050de9b14a288097cb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 19 Jun 2019 16:08:49 +0200 Subject: [PATCH] smbd: Add a clarifying comment on triggering waiters Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/locking/locking.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 41b848a3f24..4c059736ae1 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -432,6 +432,12 @@ void locking_close_file(struct messaging_context *msg_ctx, br_lck = brl_get_locks(talloc_tos(),fsp); if (br_lck) { + /* + * Unlocks must trigger dbwrap_watch watchers, + * normally in smbd_do_unlocking. Here it's done + * implictly, we're closing the file and thus remove a + * share mode. This will wake the waiters. + */ brl_close_fnum(msg_ctx, br_lck); TALLOC_FREE(br_lck); } -- 2.47.3