4 * Persistent cookie-path mappings
6 * Copyright 2002 John Levon <levon@movementarian.org>
13 #ifdef CONFIG_PROFILING
15 #include <linux/types.h>
20 * dcookie_register - register a user of dcookies
22 * Register as a dcookie user. Returns %NULL on failure.
24 struct dcookie_user
* dcookie_register(void);
27 * dcookie_unregister - unregister a user of dcookies
29 * Unregister as a dcookie user. This may invalidate
30 * any dcookie values returned from get_dcookie().
32 void dcookie_unregister(struct dcookie_user
* user
);
35 * get_dcookie - acquire a dcookie
37 * Convert the given dentry/vfsmount pair into
40 * Returns -EINVAL if no living task has registered as a
43 * Returns 0 on success, with *cookie filled in
45 int get_dcookie(struct dentry
* dentry
, struct vfsmount
* vfsmnt
,
46 unsigned long * cookie
);
50 static inline struct dcookie_user
* dcookie_register(void)
55 static inline void dcookie_unregister(struct dcookie_user
* user
)
60 static inline int get_dcookie(struct dentry
* dentry
,
61 struct vfsmount
* vfsmnt
, unsigned long * cookie
)
66 #endif /* CONFIG_PROFILING */
68 #endif /* DCOOKIES_H */