From 41d0d592b6777fb471bde1243dab324d685ceaa5 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 19 May 2021 15:03:48 +0200 Subject: [PATCH] smbd: use contend_dirleases() in notify_fname() Prepares for Directory Lease breaks. Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source3/smbd/notify.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; } -- 2.47.3