summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2011-10-28 12:56:24 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2011-10-28 12:56:24 +1100
commit86a14825145da86f6c47e2a8fa0197fae4cc9f9e (patch)
tree38dd9b762d2e7e6e94ab89838b9065b6937cb5f4
parente7cdc3cd4ccce97ad956b0c341eb01d38aa9db2b (diff)
parentbb3509b6d2ed7caee810d79fcc71db45a12d06e4 (diff)
downloadsamba-86a14825145da86f6c47e2a8fa0197fae4cc9f9e.tar.gz
samba-86a14825145da86f6c47e2a8fa0197fae4cc9f9e.tar.xz
samba-86a14825145da86f6c47e2a8fa0197fae4cc9f9e.zip
Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0474a9244c6721f85955efcbdd630c0e5990e76c)
-rw-r--r--ctdb/libctdb/ctdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctdb/libctdb/ctdb.c b/ctdb/libctdb/ctdb.c
index b555360e63..099ceac087 100644
--- a/ctdb/libctdb/ctdb.c
+++ b/ctdb/libctdb/ctdb.c
@@ -806,6 +806,13 @@ static bool try_readrecordlock(struct ctdb_lock *lock, TDB_DATA *data)
return true;
}
+ /* we dont have the record locally,
+ * drop to writelock to force a migration
+ */
+ if (!hdr && lock->readonly) {
+ lock->readonly = false;
+ }
+
tdb_chainunlock(lock->ctdb_db->tdb, lock->key);
free(hdr);
return NULL;