Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dcookies.h
Go to the documentation of this file.
1 /*
2  * dcookies.h
3  *
4  * Persistent cookie-path mappings
5  *
6  * Copyright 2002 John Levon <[email protected]>
7  */
8 
9 #ifndef DCOOKIES_H
10 #define DCOOKIES_H
11 
12 
13 #ifdef CONFIG_PROFILING
14 
15 #include <linux/dcache.h>
16 #include <linux/types.h>
17 
18 struct dcookie_user;
19 struct path;
20 
26 struct dcookie_user * dcookie_register(void);
27 
34 void dcookie_unregister(struct dcookie_user * user);
35 
47 int get_dcookie(struct path *path, unsigned long *cookie);
48 
49 #else
50 
51 static inline struct dcookie_user * dcookie_register(void)
52 {
53  return NULL;
54 }
55 
56 static inline void dcookie_unregister(struct dcookie_user * user)
57 {
58  return;
59 }
60 
61 static inline int get_dcookie(struct path *path, unsigned long *cookie)
62 {
63  return -ENOSYS;
64 }
65 
66 #endif /* CONFIG_PROFILING */
67 
68 #endif /* DCOOKIES_H */