aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dcookies.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/dcookies.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/dcookies.h')
-rw-r--r--include/linux/dcookies.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h
new file mode 100644
index 000000000000..c28050136164
--- /dev/null
+++ b/include/linux/dcookies.h
@@ -0,0 +1,69 @@
1/*
2 * dcookies.h
3 *
4 * Persistent cookie-path mappings
5 *
6 * Copyright 2002 John Levon <levon@movementarian.org>
7 */
8
9#ifndef DCOOKIES_H
10#define DCOOKIES_H
11
12#include <linux/config.h>
13
14#ifdef CONFIG_PROFILING
15
16#include <linux/types.h>
17
18struct dcookie_user;
19
20/**
21 * dcookie_register - register a user of dcookies
22 *
23 * Register as a dcookie user. Returns %NULL on failure.
24 */
25struct dcookie_user * dcookie_register(void);
26
27/**
28 * dcookie_unregister - unregister a user of dcookies
29 *
30 * Unregister as a dcookie user. This may invalidate
31 * any dcookie values returned from get_dcookie().
32 */
33void dcookie_unregister(struct dcookie_user * user);
34
35/**
36 * get_dcookie - acquire a dcookie
37 *
38 * Convert the given dentry/vfsmount pair into
39 * a cookie value.
40 *
41 * Returns -EINVAL if no living task has registered as a
42 * dcookie user.
43 *
44 * Returns 0 on success, with *cookie filled in
45 */
46int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt,
47 unsigned long * cookie);
48
49#else
50
51struct dcookie_user * dcookie_register(void)
52{
53 return NULL;
54}
55
56void dcookie_unregister(struct dcookie_user * user)
57{
58 return;
59}
60
61static inline int get_dcookie(struct dentry * dentry,
62 struct vfsmount * vfsmnt, unsigned long * cookie)
63{
64 return -ENOSYS;
65}
66
67#endif /* CONFIG_PROFILING */
68
69#endif /* DCOOKIES_H */