mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
proc: introduce a proc_pid_ns helper
Factor out retrieving the per-sb pid namespaces from the sb private data into an easier to understand helper. Suggested-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -83,4 +83,10 @@ struct ns_common;
|
||||
int open_related_ns(struct ns_common *ns,
|
||||
struct ns_common *(*get_ns)(struct ns_common *ns));
|
||||
|
||||
/* get the associated pid namespace for a file in procfs */
|
||||
static inline struct pid_namespace *proc_pid_ns(struct inode *inode)
|
||||
{
|
||||
return inode->i_sb->s_fs_info;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_PROC_FS_H */
|
||||
|
Reference in New Issue
Block a user