mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
merge from tridge
(This used to be ctdb commit d1dae4fc8f4c2d16d313a27968d67c5825a133d1)
This commit is contained in:
commit
5d0e7e354f
@ -51,14 +51,17 @@ static void lockwait_handler(struct event_context *ev, struct fd_event *fde,
|
||||
struct tdb_context *tdb = h->ctdb_db->ltdb->tdb;
|
||||
TALLOC_CTX *tmp_ctx = talloc_new(ev);
|
||||
|
||||
talloc_free(fde);
|
||||
|
||||
key.dptr = talloc_memdup(tmp_ctx, key.dptr, key.dsize);
|
||||
|
||||
talloc_set_destructor(h, NULL);
|
||||
ctdb_latency(&h->ctdb->status.max_lockwait_latency, h->start_time);
|
||||
h->ctdb->status.pending_lockwait_calls--;
|
||||
|
||||
/* the fde needs to go away when the context is gone - when
|
||||
the fde goes away this implicitly closes the pipe, which
|
||||
kills the child holding the lock */
|
||||
talloc_steal(tmp_ctx, fde);
|
||||
|
||||
tdb_chainlock_mark(tdb, key);
|
||||
callback(p);
|
||||
tdb_chainlock_unmark(tdb, key);
|
||||
|
Loading…
Reference in New Issue
Block a user