From: Ralph Boehme Date: Wed, 19 May 2021 13:03:48 +0000 (+0200) Subject: smbd: use contend_dirleases() in notify_fname() X-Git-Tag: tdb-1.4.13~708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41d0d592b6777fb471bde1243dab324d685ceaa5;p=thirdparty%2Fsamba.git smbd: use contend_dirleases() in notify_fname() Prepares for Directory Lease breaks. Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 569e089dea8..61b5b60bcf6 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -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; }