summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-11-20 19:30:18 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-12-05 19:01:16 -0500
commit71215a75ceddf38ba9d4563481da8dd943de10fc (patch)
tree5ed65751530bbe094ffb9325d1f401506567ce95
parent8bd107633b64195a0748b05236c3d14db0a8bed4 (diff)
downloadlinux-71215a75ceddf38ba9d4563481da8dd943de10fc.tar.bz2
constify get_dcookie() and friends
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c2
-rw-r--r--drivers/oprofile/buffer_sync.c2
-rw-r--r--fs/dcookies.c4
-rw-r--r--include/linux/dcookies.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 83d2b4ef7f0d..44d67b167e0b 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -295,7 +295,7 @@ out:
* dcookie user still being registered (namely, the reader
* of the event buffer).
*/
-static inline unsigned long fast_get_dcookie(struct path *path)
+static inline unsigned long fast_get_dcookie(const struct path *path)
{
unsigned long cookie;
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index 82f7000a285d..642478d35e99 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -206,7 +206,7 @@ void sync_stop(void)
* because we cannot reach this code without at least one
* dcookie user still being registered (namely, the reader
* of the event buffer). */
-static inline unsigned long fast_get_dcookie(struct path *path)
+static inline unsigned long fast_get_dcookie(const struct path *path)
{
unsigned long cookie;
diff --git a/fs/dcookies.c b/fs/dcookies.c
index ac44a69fbea9..a26a701ef512 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -90,7 +90,7 @@ static void hash_dcookie(struct dcookie_struct * dcs)
}
-static struct dcookie_struct *alloc_dcookie(struct path *path)
+static struct dcookie_struct *alloc_dcookie(const struct path *path)
{
struct dcookie_struct *dcs = kmem_cache_alloc(dcookie_cache,
GFP_KERNEL);
@@ -113,7 +113,7 @@ static struct dcookie_struct *alloc_dcookie(struct path *path)
/* This is the main kernel-side routine that retrieves the cookie
* value for a dentry/vfsmnt pair.
*/
-int get_dcookie(struct path *path, unsigned long *cookie)
+int get_dcookie(const struct path *path, unsigned long *cookie)
{
int err = 0;
struct dcookie_struct * dcs;
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h
index 5ac3bdd5cee6..699b6c499c4f 100644
--- a/include/linux/dcookies.h
+++ b/include/linux/dcookies.h
@@ -44,7 +44,7 @@ void dcookie_unregister(struct dcookie_user * user);
*
* Returns 0 on success, with *cookie filled in
*/
-int get_dcookie(struct path *path, unsigned long *cookie);
+int get_dcookie(const struct path *path, unsigned long *cookie);
#else
@@ -58,7 +58,7 @@ static inline void dcookie_unregister(struct dcookie_user * user)
return;
}
-static inline int get_dcookie(struct path *path, unsigned long *cookie)
+static inline int get_dcookie(const struct path *path, unsigned long *cookie)
{
return -ENOSYS;
}