]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use contend_dirleases() in notify_fname()
authorRalph Boehme <slow@samba.org>
Wed, 19 May 2021 13:03:48 +0000 (15:03 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:30 +0000 (14:39 +0000)
Prepares for Directory Lease breaks.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/notify.c

index 569e089dea8f3898ee9c0a208bb5159a5f44e701..61b5b60bcf68ffa36961990f8637172c2157c3ba 100644 (file)
@@ -586,6 +586,14 @@ void notify_fname(struct connection_struct *conn,
        struct notify_context *notify_ctx = conn->sconn->notify_ctx;
        const char *path = smb_fname->base_name;
 
+       if (action & NOTIFY_ACTION_DIRLEASE_BREAK) {
+               contend_dirleases(conn, smb_fname, lease);
+       }
+       action &= ~NOTIFY_ACTION_DIRLEASE_BREAK;
+       if (action == 0) {
+               return;
+       }
+
        if (path[0] == '.' && path[1] == '/') {
                path += 2;
        }