lib: Allow a 4th lock order
authorVolker Lendecke <vl@samba.org>
Sun, 15 Sep 2019 09:56:25 +0000 (11:56 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 17 Sep 2019 22:49:39 +0000 (22:49 +0000)
We will have another tdb soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/dbwrap/dbwrap.h
lib/dbwrap/dbwrap_private.h

index 42998b78139c1a96d6079ca8d417959afc51e061..591eac5c63aaa1d07295b8c3fea7995b352ee349 100644 (file)
@@ -33,7 +33,8 @@ enum dbwrap_lock_order {
        DBWRAP_LOCK_ORDER_NONE = 0, /* Don't check lock orders for this db. */
        DBWRAP_LOCK_ORDER_1 = 1,
        DBWRAP_LOCK_ORDER_2 = 2,
-       DBWRAP_LOCK_ORDER_3 = 3
+       DBWRAP_LOCK_ORDER_3 = 3,
+       DBWRAP_LOCK_ORDER_4 = 4
 };
 
 #define DBWRAP_FLAG_NONE                     0x0000000000000000ULL
index e757215d3896a296c22cef1b317cc9ca66b7bec6..b548168b9a961cae9610c61bab7e340391dc3a0a 100644 (file)
@@ -84,7 +84,7 @@ struct db_context {
 };
 
 #define DBWRAP_LOCK_ORDER_MIN DBWRAP_LOCK_ORDER_1
-#define DBWRAP_LOCK_ORDER_MAX DBWRAP_LOCK_ORDER_3
+#define DBWRAP_LOCK_ORDER_MAX DBWRAP_LOCK_ORDER_4
 
 #define DBWRAP_LOCK_ORDER_VALID(order) \
        (((order) >= DBWRAP_LOCK_ORDER_MIN) && \