summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/brlock_ctdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster/ctdb/brlock_ctdb.c')
-rw-r--r--source4/cluster/ctdb/brlock_ctdb.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c
index fecc88da45..8b633358a3 100644
--- a/source4/cluster/ctdb/brlock_ctdb.c
+++ b/source4/cluster/ctdb/brlock_ctdb.c
@@ -148,7 +148,7 @@ static struct brl_handle *brl_ctdb_create_handle(TALLOC_CTX *mem_ctx, struct ntv
/*
see if two locking contexts are equal
*/
-static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2)
+static bool brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2)
{
return (cluster_id_equal(&ctx1->server, &ctx2->server) &&
ctx1->smbpid == ctx2->smbpid &&
@@ -158,7 +158,7 @@ static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context
/*
see if lck1 and lck2 overlap
*/
-static BOOL brl_ctdb_overlap(struct lock_struct *lck1,
+static bool brl_ctdb_overlap(struct lock_struct *lck1,
struct lock_struct *lck2)
{
/* this extra check is not redundent - it copes with locks
@@ -166,35 +166,35 @@ static BOOL brl_ctdb_overlap(struct lock_struct *lck1,
if (lck1->size != 0 &&
lck1->start == lck2->start &&
lck1->size == lck2->size) {
- return True;
+ return true;
}
if (lck1->start >= (lck2->start+lck2->size) ||
lck2->start >= (lck1->start+lck1->size)) {
- return False;
+ return false;
}
- return True;
+ return true;
}
/*
See if lock2 can be added when lock1 is in place.
*/
-static BOOL brl_ctdb_conflict(struct lock_struct *lck1,
+static bool brl_ctdb_conflict(struct lock_struct *lck1,
struct lock_struct *lck2)
{
/* pending locks don't conflict with anything */
if (lck1->lock_type >= PENDING_READ_LOCK ||
lck2->lock_type >= PENDING_READ_LOCK) {
- return False;
+ return false;
}
if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) {
- return False;
+ return false;
}
if (brl_ctdb_same_context(&lck1->context, &lck2->context) &&
lck2->lock_type == READ_LOCK && lck1->ntvfs == lck2->ntvfs) {
- return False;
+ return false;
}
return brl_ctdb_overlap(lck1, lck2);
@@ -205,16 +205,16 @@ static BOOL brl_ctdb_conflict(struct lock_struct *lck1,
Check to see if this lock conflicts, but ignore our own locks on the
same fnum only.
*/
-static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2)
+static bool brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2)
{
/* pending locks don't conflict with anything */
if (lck1->lock_type >= PENDING_READ_LOCK ||
lck2->lock_type >= PENDING_READ_LOCK) {
- return False;
+ return false;
}
if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK)
- return False;
+ return false;
/*
* note that incoming write calls conflict with existing READ
@@ -224,7 +224,7 @@ static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct
if (brl_ctdb_same_context(&lck1->context, &lck2->context) &&
lck1->ntvfs == lck2->ntvfs &&
(lck2->lock_type == READ_LOCK || lck1->lock_type == WRITE_LOCK)) {
- return False;
+ return false;
}
return brl_ctdb_overlap(lck1, lck2);