From e4dc1b14d8dc57c3975bf69740e4f5cda6bfba09 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 16 Oct 2007 23:26:03 -0700 Subject: Use list_head in binfmt handling Switch single-linked binfmt formats list to usual list_head's. This leads to one-liners in register_binfmt() and unregister_binfmt(). The downside is one pointer more in struct linux_binfmt. This is not a problem, since the set of registered binfmts on typical box is very small -- (ELF + something distro enabled for you). Test-booted, played with executable .txt files, modprobe/rmmod binfmt_misc. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/binfmts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 91c8c07fe8b..6b834dcd20b 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -63,7 +63,7 @@ struct linux_binprm{ * linux accepts. */ struct linux_binfmt { - struct linux_binfmt * next; + struct list_head lh; struct module *module; int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); int (*load_shlib)(struct file *); -- cgit v1.2.3