]> git.karo-electronics.de Git - linux-beck.git/commitdiff
constify get_dcookie() and friends
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 Nov 2016 00:30:18 +0000 (19:30 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 6 Dec 2016 00:01:16 +0000 (19:01 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/oprofile/cell/spu_task_sync.c
drivers/oprofile/buffer_sync.c
fs/dcookies.c
include/linux/dcookies.h

index 83d2b4ef7f0de61297fcd1dbc5b37bf2dc9478e1..44d67b167e0b18eeb512e3c059817c31fcc0f2cc 100644 (file)
@@ -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;
 
index 82f7000a285d3780229a0ac5d49bac5618176f1d..642478d35e99a5c023a03a2d8f9593c8e4fbbde2 100644 (file)
@@ -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;
 
index ac44a69fbea9a533dbcc27cdc27771f4f7795f1e..a26a701ef512e840d21b9bdd7024ff1574e4b3c6 100644 (file)
@@ -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;
index 5ac3bdd5cee677ab7ff752c8ea87a959b35e134a..699b6c499c4f5a3c600380b8aa8971ab3bba61b4 100644 (file)
@@ -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;
 }