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

proc: spread "const" a bit

Link: http://lkml.kernel.org/r/20180627200614.GB18434@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
891ae71d f6d2f584

+3 -3
+2 -2
fs/proc/internal.h
··· 113 113 return PDE(inode)->data; 114 114 } 115 115 116 - static inline struct pid *proc_pid(struct inode *inode) 116 + static inline struct pid *proc_pid(const struct inode *inode) 117 117 { 118 118 return PROC_I(inode)->pid; 119 119 } 120 120 121 - static inline struct task_struct *get_proc_task(struct inode *inode) 121 + static inline struct task_struct *get_proc_task(const struct inode *inode) 122 122 { 123 123 return get_pid_task(proc_pid(inode), PIDTYPE_PID); 124 124 }
+1 -1
include/linux/proc_fs.h
··· 129 129 struct ns_common *(*get_ns)(struct ns_common *ns)); 130 130 131 131 /* get the associated pid namespace for a file in procfs */ 132 - static inline struct pid_namespace *proc_pid_ns(struct inode *inode) 132 + static inline struct pid_namespace *proc_pid_ns(const struct inode *inode) 133 133 { 134 134 return inode->i_sb->s_fs_info; 135 135 }