summaryrefslogtreecommitdiff
path: root/include/linux/lockref.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-01-09 15:19:03 -0800
committerSasha Levin <alexander.levin@verizon.com>2016-08-22 12:23:17 -0400
commitead2cea23e7a9915c8023fd7cb9ba862da7ca86a (patch)
tree09d28d0197425d73b9a976aefcc78d3f27b26ee2 /include/linux/lockref.h
parentcf4f30b2501fc90f23a935422af07bdddc155678 (diff)
downloadlwn-ead2cea23e7a9915c8023fd7cb9ba862da7ca86a.tar.gz
lwn-ead2cea23e7a9915c8023fd7cb9ba862da7ca86a.zip
dcache: let the dentry count go down to zero without taking d_lock
[ Upstream commit 360f54796ed65939093ae373b92ebd5ef3341776 ] 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> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r--include/linux/lockref.h3
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 {
#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 *);