summaryrefslogtreecommitdiff
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-06-18 00:33:20 +0400
committerEric W. Biederman <ebiederm@xmission.com>2012-11-20 16:19:19 +0400
commit33d6dce607573b5fd7a43168e0d91221b3ca532b (patch)
treec7743ed6aab1fe2026f20e6a1ddf708a16aa1c84 /include/linux/proc_fs.h
parent4f326c0064b20b78b8041f4d2f6fe188a1129f18 (diff)
downloadlinux-33d6dce607573b5fd7a43168e0d91221b3ca532b.tar.xz
proc: Generalize proc inode allocation
Generalize the proc inode allocation so that it can be used without having to having to create a proc_dir_entry. This will allow namespace file descriptors to remain light weight entitities but still have the same inode number when the backing namespace is the same. Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 31447819bc55..bf1d000fbba6 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -176,6 +176,8 @@ extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
extern struct file *proc_ns_fget(int fd);
extern bool proc_ns_inode(struct inode *inode);
+extern int proc_alloc_inum(unsigned int *pino);
+extern void proc_free_inum(unsigned int inum);
#else
#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
@@ -235,6 +237,14 @@ static inline bool proc_ns_inode(struct inode *inode)
return false;
}
+static inline int proc_alloc_inum(unsigned int *inum)
+{
+ *inum = 1;
+ return 0;
+}
+static inline void proc_free_inum(unsigned int inum)
+{
+}
#endif /* CONFIG_PROC_FS */
#if !defined(CONFIG_PROC_KCORE)