]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/locking: add brlock_wipe()
authorRalph Boehme <slow@samba.org>
Wed, 29 Oct 2025 13:37:38 +0000 (14:37 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:37 +0000 (10:18 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/locking/brlock.c
source3/locking/proto.h

index 47df257b5ec247184e01c70d042c6ca83085128e..b6145c54729ac42e008f561f5a3e0a88a2cb2aa6 100644 (file)
@@ -2100,3 +2100,14 @@ bool file_has_brlocks(files_struct *fsp)
        }
        return false;
 }
+
+NTSTATUS brlock_wipe(struct dbwrap_wipe_flags flags)
+{
+       int ret;
+
+       ret = dbwrap_wipe(brlock_db, flags);
+       if (ret != 0) {
+               return NT_STATUS_INTERNAL_DB_ERROR;
+       }
+       return NT_STATUS_OK;
+}
index 8c151a42090b77bd881551b1d3f4a3c1f22a0f20..37eb01dc5ee594936f2830f0dfe6b9b9ed92b610 100644 (file)
@@ -109,6 +109,8 @@ struct byte_range_lock *brl_get_locks_readonly(files_struct *fsp);
 bool brl_cleanup_disconnected(struct file_id fid, uint64_t open_persistent_id);
 void brl_set_modified(struct byte_range_lock *br_lck, bool modified);
 bool file_has_brlocks(files_struct *fsp);
+struct dbwrap_wipe_flags;
+NTSTATUS brlock_wipe(struct dbwrap_wipe_flags flags);
 
 /* The following definitions come from locking/locking.c  */