smbd: Add a clarifying comment on triggering waiters
authorVolker Lendecke <vl@samba.org>
Wed, 19 Jun 2019 14:08:49 +0000 (16:08 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 20 Jun 2019 17:18:19 +0000 (17:18 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/locking.c

index 41b848a3f246780b5917f898734a640b217a7af4..4c059736ae13e1e44597ca1e9c48c89bcbdb382d 100644 (file)
@@ -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);
        }