aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-06-17 13:33:20 -0700
committerZiyan <jaraidaniel@gmail.com>2016-04-03 14:55:56 +0200
commitade1c37e1a4b1a8ac86414c38ed82dcf9c2dfe0f (patch)
tree3827f8b95adb99fe3369f5c6b93d1c8ab6170f44 /include
parent7a2ee4344922996036d5c0005ace454e4c8cf59a (diff)
downloadkernel_samsung_tuna-ade1c37e1a4b1a8ac86414c38ed82dcf9c2dfe0f.zip
kernel_samsung_tuna-ade1c37e1a4b1a8ac86414c38ed82dcf9c2dfe0f.tar.gz
kernel_samsung_tuna-ade1c37e1a4b1a8ac86414c38ed82dcf9c2dfe0f.tar.bz2
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> (cherry picked from commit 33d6dce607573b5fd7a43168e0d91221b3ca532b)
Diffstat (limited to 'include')
-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 d1fff69..7d48920 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)