+ if (new_lck->ltype == F_RDLCK && ltype == F_WRLCK) {
+ tdb->ecode = TDB_ERR_LOCK;
+ tdb->log(tdb, TDB_DEBUG_FATAL, tdb->log_priv,
+ "tdb_nest_lock: offset %llu has read lock\n",
+ (long long)offset);
+ return -1;
+ }
+ /* Just increment the struct, posix locks don't stack. */