4 * Persistent cookie-path mappings
6 * Copyright 2002 John Levon <levon@movementarian.org>
12 #include <linux/config.h>
14 #ifdef CONFIG_PROFILING
16 #include <linux/types.h>
21 * dcookie_register - register a user of dcookies
23 * Register as a dcookie user. Returns %NULL on failure.
25 struct dcookie_user
* dcookie_register(void);
28 * dcookie_unregister - unregister a user of dcookies
30 * Unregister as a dcookie user. This may invalidate
31 * any dcookie values returned from get_dcookie().
33 void dcookie_unregister(struct dcookie_user
* user
);
36 * get_dcookie - acquire a dcookie
38 * Convert the given dentry/vfsmount pair into
41 * Returns -EINVAL if no living task has registered as a
44 * Returns 0 on success, with *cookie filled in
46 int get_dcookie(struct dentry
* dentry
, struct vfsmount
* vfsmnt
,
47 unsigned long * cookie
);
51 struct dcookie_user
* dcookie_register(void)
56 void dcookie_unregister(struct dcookie_user
* user
)
61 static inline int get_dcookie(struct dentry
* dentry
,
62 struct vfsmount
* vfsmnt
, unsigned long * cookie
)
67 #endif /* CONFIG_PROFILING */
69 #endif /* DCOOKIES_H */