mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
dcache: let the dentry count go down to zero without taking d_lock
We can be more aggressive about this, if we are clever and careful. This is subtle. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
32426f6653
commit
360f54796e
3 changed files with 144 additions and 13 deletions
|
@ -28,12 +28,13 @@ struct lockref {
|
|||
#endif
|
||||
struct {
|
||||
spinlock_t lock;
|
||||
unsigned int count;
|
||||
int count;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extern void lockref_get(struct lockref *);
|
||||
extern int lockref_put_return(struct lockref *);
|
||||
extern int lockref_get_not_zero(struct lockref *);
|
||||
extern int lockref_get_or_lock(struct lockref *);
|
||||
extern int lockref_put_or_lock(struct lockref *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue