Skip to content

Commit 71215a7

Browse files
author
Al Viro
committed
constify get_dcookie() and friends
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 8bd1076 commit 71215a7

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎arch/powerpc/oprofile/cell/spu_task_sync.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static int release_cached_info(int spu_index)
295295
* dcookie user still being registered (namely, the reader
296296
* of the event buffer).
297297
*/
298-
static inline unsigned long fast_get_dcookie(struct path *path)
298+
static inline unsigned long fast_get_dcookie(const struct path *path)
299299
{
300300
unsigned long cookie;
301301

‎drivers/oprofile/buffer_sync.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void sync_stop(void)
206206
* because we cannot reach this code without at least one
207207
* dcookie user still being registered (namely, the reader
208208
* 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)
210210
{
211211
unsigned long cookie;
212212

‎fs/dcookies.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static void hash_dcookie(struct dcookie_struct * dcs)
9090
}
9191

9292

93-
static struct dcookie_struct *alloc_dcookie(struct path *path)
93+
static struct dcookie_struct *alloc_dcookie(const struct path *path)
9494
{
9595
struct dcookie_struct *dcs = kmem_cache_alloc(dcookie_cache,
9696
GFP_KERNEL);
@@ -113,7 +113,7 @@ static struct dcookie_struct *alloc_dcookie(struct path *path)
113113
/* This is the main kernel-side routine that retrieves the cookie
114114
* value for a dentry/vfsmnt pair.
115115
*/
116-
int get_dcookie(struct path *path, unsigned long *cookie)
116+
int get_dcookie(const struct path *path, unsigned long *cookie)
117117
{
118118
int err = 0;
119119
struct dcookie_struct * dcs;

‎include/linux/dcookies.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void dcookie_unregister(struct dcookie_user * user);
4444
*
4545
* Returns 0 on success, with *cookie filled in
4646
*/
47-
int get_dcookie(struct path *path, unsigned long *cookie);
47+
int get_dcookie(const struct path *path, unsigned long *cookie);
4848

4949
#else
5050

@@ -58,7 +58,7 @@ static inline void dcookie_unregister(struct dcookie_user * user)
5858
return;
5959
}
6060

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)
6262
{
6363
return -ENOSYS;
6464
}

0 commit comments

Comments
 (0)