diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-09 18:19:03 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-01-25 23:16:29 -0500 |
commit | 360f54796ed65939093ae373b92ebd5ef3341776 (patch) | |
tree | b89eeed53d0f4ff4ca9b753ca3f239e6fa0be005 /include/linux/lockref.h | |
parent | 32426f6653cbfde1ca16aff27a530ee36332f796 (diff) |
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>
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r-- | include/linux/lockref.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/lockref.h b/include/linux/lockref.h index 4bfde0e99ed5..b10b122dd099 100644 --- a/include/linux/lockref.h +++ b/include/linux/lockref.h | |||
@@ -28,12 +28,13 @@ struct lockref { | |||
28 | #endif | 28 | #endif |
29 | struct { | 29 | struct { |
30 | spinlock_t lock; | 30 | spinlock_t lock; |
31 | unsigned int count; | 31 | int count; |
32 | }; | 32 | }; |
33 | }; | 33 | }; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | extern void lockref_get(struct lockref *); | 36 | extern void lockref_get(struct lockref *); |
37 | extern int lockref_put_return(struct lockref *); | ||
37 | extern int lockref_get_not_zero(struct lockref *); | 38 | extern int lockref_get_not_zero(struct lockref *); |
38 | extern int lockref_get_or_lock(struct lockref *); | 39 | extern int lockref_get_or_lock(struct lockref *); |
39 | extern int lockref_put_or_lock(struct lockref *); | 40 | extern int lockref_put_or_lock(struct lockref *); |