Skip to content

Commit

Permalink
fs/proc/internal.h: shuffle "struct pde_opener"
Browse files Browse the repository at this point in the history
List iteration takes more code than anything else which means embedded
list_head should be the first element of the structure.

Space savings:

	add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-18 (-18)
	Function                                     old     new   delta
	close_pdeo                                   228     227      -1
	proc_reg_release                              86      82      -4
	proc_entry_rundown                           143     139      -4
	proc_reg_open                                298     289      -9

Link: http://lkml.kernel.org/r/20191004234753.GB30246@avx2
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Dec 5, 2019
1 parent 5f6354e commit 70a731c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ extern ssize_t proc_simple_write(struct file *, const char __user *, size_t, lof
* inode.c
*/
struct pde_opener {
struct file *file;
struct list_head lh;
struct file *file;
bool closing;
struct completion *c;
} __randomize_layout;
Expand Down

0 comments on commit 70a731c

Please sign in to comment.