Skip to content

Commit 891ae71

Browse files
Alexey Dobriyantorvalds
authored andcommitted
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>
1 parent f6d2f58 commit 891ae71

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/proc/internal.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ static inline void *__PDE_DATA(const struct inode *inode)
113113
return PDE(inode)->data;
114114
}
115115

116-
static inline struct pid *proc_pid(struct inode *inode)
116+
static inline struct pid *proc_pid(const struct inode *inode)
117117
{
118118
return PROC_I(inode)->pid;
119119
}
120120

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)
122122
{
123123
return get_pid_task(proc_pid(inode), PIDTYPE_PID);
124124
}

‎include/linux/proc_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ int open_related_ns(struct ns_common *ns,
129129
struct ns_common *(*get_ns)(struct ns_common *ns));
130130

131131
/* 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)
133133
{
134134
return inode->i_sb->s_fs_info;
135135
}

0 commit comments

Comments
 (0)