summaryrefslogtreecommitdiff
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-02-06 15:37:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-06 18:32:43 -0800
commit93ad5bc6d4addb74e30d421cd3ba5249c961fb3e (patch)
tree6c739b20c4d25cab23c2bd0e008c8ded561f86c5 /fs/proc/internal.h
parent15b158b4e6274351fc3cf652cbabc57104efb547 (diff)
proc: rearrange args
Rearrange args for smaller code. lookup revolves around memcmp() which gets len 3rd arg, so propagate length as 3rd arg. readdir and lookup add additional arg to VFS ->readdir and ->lookup, so better add it to the end. Space savings on x86_64: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18 (-18) Function old new delta proc_readdir 22 13 -9 proc_lookup 18 9 -9 proc_match() is smaller if not inlined, I promise! Link: http://lkml.kernel.org/r/20180104175958.GB5204@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r--fs/proc/internal.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 5ba317874f0d..d697c8ab0a14 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -153,10 +153,9 @@ extern bool proc_fill_cache(struct file *, struct dir_context *, const char *, i
* generic.c
*/
extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
-extern struct dentry *proc_lookup_de(struct proc_dir_entry *, struct inode *,
- struct dentry *);
+struct dentry *proc_lookup_de(struct inode *, struct dentry *, struct proc_dir_entry *);
extern int proc_readdir(struct file *, struct dir_context *);
-extern int proc_readdir_de(struct proc_dir_entry *, struct file *, struct dir_context *);
+int proc_readdir_de(struct file *, struct dir_context *, struct proc_dir_entry *);
static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde)
{