Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
39a7f915
Commit
39a7f915
authored
Apr 28, 2008
by
Howard Chu
Browse files
Sync with HEAD - deadlock fix
parent
3b508c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/cache.c
View file @
39a7f915
...
...
@@ -1257,18 +1257,19 @@ bdb_cache_delete(
assert
(
e
->
e_private
!=
NULL
);
/* Lock the entry's info */
bdb_cache_entryinfo_lock
(
ei
);
/* Set this early, warn off any queriers */
ei
->
bei_state
|=
CACHE_ENTRY_DELETED
;
/* Lock the entry's info */
bdb_cache_entryinfo_lock
(
ei
);
bdb_cache_entryinfo_unlock
(
ei
);
/* Get write lock on the data */
rc
=
bdb_cache_entry_db_relock
(
bdb
,
locker
,
ei
,
1
,
0
,
lock
);
if
(
rc
)
{
/* couldn't lock, undo and give up */
ei
->
bei_state
^=
CACHE_ENTRY_DELETED
;
bdb_cache_entryinfo_unlock
(
ei
);
return
rc
;
}
...
...
@@ -1283,8 +1284,6 @@ bdb_cache_delete(
/* free lru mutex */
ldap_pvt_thread_mutex_unlock
(
&
bdb
->
bi_cache
.
c_lru_mutex
);
/* Leave entry info locked */
return
(
rc
);
}
...
...
@@ -1293,6 +1292,8 @@ bdb_cache_delete_cleanup(
Cache
*
cache
,
EntryInfo
*
ei
)
{
bdb_cache_entryinfo_lock
(
ei
);
if
(
ei
->
bei_e
)
{
ei
->
bei_e
->
e_private
=
NULL
;
#ifdef SLAP_ZONE_ALLOC
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment