diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-13 15:16:31 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-04-17 14:06:45 +0200 |
commit | f4823c00581eb91e5b42169405e641463256bbfa (patch) | |
tree | 1393572a2a88e25c47ae9de2aa3cda32a1a73783 /libdiskfs/node-make.c | |
parent | e17366f09a6003dcc95633ce312aa3753f056e28 (diff) |
isofs: use a seperate lock to protect node_cache
Previously, isofs used diskfs_node_refcnt_lock to serialize access to
the node_cache.
Use a separate lock to protect node_cache. Adjust the reference
counting accordingly. Every node in the node_cache carries a light
reference. When we are asked to give up that light reference, we
reacquire our lock momentarily to check whether someone else
reacquired a reference through the node_cache.
* isofs/inode.c (nodecache_lock): New lock.
(inode_cache_find): Use a separate lock to protect node_cache.
Adjust the reference counting accordingly.
(diskfs_cached_lookup): Likewise.
(load_inode): Likewise.
(cache_inode): Update comment accordingly.
(diskfs_node_iterate): Likewise.
(diskfs_node_norefs): Move the code removing the node from node_cache...
(diskfs_try_dropping_softrefs): ... here, where we check whether
someone reacquired a reference, and if so hold on to our light
reference.
Diffstat (limited to 'libdiskfs/node-make.c')
0 files changed, 0 insertions, 0 deletions