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
Simon
OpenLDAP
Commits
2bfb0bde
Commit
2bfb0bde
authored
Nov 25, 2003
by
Howard Chu
Browse files
Fix spurious lock messages from slapcat
parent
4eee5c85
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/cache.c
View file @
2bfb0bde
...
...
@@ -140,6 +140,8 @@ bdb_cache_entry_db_unlock
#else
int
rc
;
if
(
!
lock
)
return
0
;
rc
=
LOCK_PUT
(
env
,
lock
);
return
rc
;
#endif
...
...
@@ -489,7 +491,13 @@ bdb_cache_lru_add(
EntryInfo
*
ei
)
{
DB_LOCK
lock
;
DB_LOCK
lock
,
*
lockp
;
if
(
locker
)
{
lockp
=
&
lock
;
}
else
{
lockp
=
NULL
;
}
/* See if we're above the cache size limit */
if
(
bdb
->
bi_cache
.
c_cursize
>
bdb
->
bi_cache
.
c_maxsize
)
{
...
...
@@ -507,20 +515,20 @@ bdb_cache_lru_add(
* the object is idle.
*/
if
(
bdb_cache_entry_db_lock
(
bdb
->
bi_dbenv
,
locker
,
elru
,
1
,
1
,
&
lock
)
==
0
)
{
lock
p
)
==
0
)
{
/* If there's no entry, or this node is in
* the process of linking into the cache,
* skip it.
*/
if
(
!
elru
->
bei_e
||
(
elru
->
bei_state
&
CACHE_ENTRY_NOT_LINKED
)
)
{
bdb_cache_entry_db_unlock
(
bdb
->
bi_dbenv
,
&
lock
);
bdb_cache_entry_db_unlock
(
bdb
->
bi_dbenv
,
lock
p
);
continue
;
}
LRU_DELETE
(
&
bdb
->
bi_cache
,
elru
);
elru
->
bei_e
->
e_private
=
NULL
;
bdb_entry_return
(
elru
->
bei_e
);
elru
->
bei_e
=
NULL
;
bdb_cache_entry_db_unlock
(
bdb
->
bi_dbenv
,
&
lock
);
bdb_cache_entry_db_unlock
(
bdb
->
bi_dbenv
,
lock
p
);
--
bdb
->
bi_cache
.
c_cursize
;
if
(
bdb
->
bi_cache
.
c_cursize
<
bdb
->
bi_cache
.
c_maxsize
)
break
;
...
...
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