diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-13 15:14:53 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-04-11 18:42:46 +0200 |
commit | e17366f09a6003dcc95633ce312aa3753f056e28 (patch) | |
tree | 42170f51b30fad175d7c1f547baaf4cca38de5ed /auth | |
parent | 4166312a45357c2ff11b00219dfb83b7475ac4b1 (diff) |
fatfs: use a seperate lock to protect nodehash
Previously, fatfs used diskfs_node_refcnt_lock to serialize access to
the nodehash.
Use a separate lock to protect nodehash. Adjust the reference
counting accordingly. Every node in the nodehash 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 nodehash.
* fatfs/inode.c (nodecache_lock): New lock.
(diskfs_cached_lookup): Use a separate lock to protect nodehash.
Adjust the reference counting accordingly.
(ifind): Likewise.
(diskfs_node_iterate): Likewise.
(diskfs_node_norefs): Move the code removing the node from nodehash...
(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 'auth')
0 files changed, 0 insertions, 0 deletions