Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

constify get_dcookie() and friends

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 71215a75 8bd10763

+6 -6
+1 -1
arch/powerpc/oprofile/cell/spu_task_sync.c
··· 295 295 * dcookie user still being registered (namely, the reader 296 296 * of the event buffer). 297 297 */ 298 - static inline unsigned long fast_get_dcookie(struct path *path) 298 + static inline unsigned long fast_get_dcookie(const struct path *path) 299 299 { 300 300 unsigned long cookie; 301 301
+1 -1
drivers/oprofile/buffer_sync.c
··· 206 206 * because we cannot reach this code without at least one 207 207 * dcookie user still being registered (namely, the reader 208 208 * of the event buffer). */ 209 - static inline unsigned long fast_get_dcookie(struct path *path) 209 + static inline unsigned long fast_get_dcookie(const struct path *path) 210 210 { 211 211 unsigned long cookie; 212 212
+2 -2
fs/dcookies.c
··· 90 90 } 91 91 92 92 93 - static struct dcookie_struct *alloc_dcookie(struct path *path) 93 + static struct dcookie_struct *alloc_dcookie(const struct path *path) 94 94 { 95 95 struct dcookie_struct *dcs = kmem_cache_alloc(dcookie_cache, 96 96 GFP_KERNEL); ··· 113 113 /* This is the main kernel-side routine that retrieves the cookie 114 114 * value for a dentry/vfsmnt pair. 115 115 */ 116 - int get_dcookie(struct path *path, unsigned long *cookie) 116 + int get_dcookie(const struct path *path, unsigned long *cookie) 117 117 { 118 118 int err = 0; 119 119 struct dcookie_struct * dcs;
+2 -2
include/linux/dcookies.h
··· 44 44 * 45 45 * Returns 0 on success, with *cookie filled in 46 46 */ 47 - int get_dcookie(struct path *path, unsigned long *cookie); 47 + int get_dcookie(const struct path *path, unsigned long *cookie); 48 48 49 49 #else 50 50 ··· 58 58 return; 59 59 } 60 60 61 - static inline int get_dcookie(struct path *path, unsigned long *cookie) 61 + static inline int get_dcookie(const struct path *path, unsigned long *cookie) 62 62 { 63 63 return -ENOSYS; 64 64 }