diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_aout.c | 3 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 3 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 3 | ||||
-rw-r--r-- | fs/binfmt_em86.c | 3 | ||||
-rw-r--r-- | fs/binfmt_flat.c | 3 | ||||
-rw-r--r-- | fs/binfmt_misc.c | 7 | ||||
-rw-r--r-- | fs/binfmt_script.c | 3 | ||||
-rw-r--r-- | fs/binfmt_som.c | 3 | ||||
-rw-r--r-- | fs/exec.c | 6 |
9 files changed, 18 insertions, 16 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 1ff94054d35a..a543364ba29b 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -454,7 +454,8 @@ out: | |||
454 | 454 | ||
455 | static int __init init_aout_binfmt(void) | 455 | static int __init init_aout_binfmt(void) |
456 | { | 456 | { |
457 | return register_binfmt(&aout_format); | 457 | register_binfmt(&aout_format); |
458 | return 0; | ||
458 | } | 459 | } |
459 | 460 | ||
460 | static void __exit exit_aout_binfmt(void) | 461 | static void __exit exit_aout_binfmt(void) |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 07d096c49920..f8ac4251877e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -2077,7 +2077,8 @@ out: | |||
2077 | 2077 | ||
2078 | static int __init init_elf_binfmt(void) | 2078 | static int __init init_elf_binfmt(void) |
2079 | { | 2079 | { |
2080 | return register_binfmt(&elf_format); | 2080 | register_binfmt(&elf_format); |
2081 | return 0; | ||
2081 | } | 2082 | } |
2082 | 2083 | ||
2083 | static void __exit exit_elf_binfmt(void) | 2084 | static void __exit exit_elf_binfmt(void) |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 30745f459faf..e7afcb67a2d3 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -91,7 +91,8 @@ static struct linux_binfmt elf_fdpic_format = { | |||
91 | 91 | ||
92 | static int __init init_elf_fdpic_binfmt(void) | 92 | static int __init init_elf_fdpic_binfmt(void) |
93 | { | 93 | { |
94 | return register_binfmt(&elf_fdpic_format); | 94 | register_binfmt(&elf_fdpic_format); |
95 | return 0; | ||
95 | } | 96 | } |
96 | 97 | ||
97 | static void __exit exit_elf_fdpic_binfmt(void) | 98 | static void __exit exit_elf_fdpic_binfmt(void) |
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index b8e8b0acf9bd..2790c7e1912e 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c | |||
@@ -100,7 +100,8 @@ static struct linux_binfmt em86_format = { | |||
100 | 100 | ||
101 | static int __init init_em86_binfmt(void) | 101 | static int __init init_em86_binfmt(void) |
102 | { | 102 | { |
103 | return register_binfmt(&em86_format); | 103 | register_binfmt(&em86_format); |
104 | return 0; | ||
104 | } | 105 | } |
105 | 106 | ||
106 | static void __exit exit_em86_binfmt(void) | 107 | static void __exit exit_em86_binfmt(void) |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 1bffbe0ed778..68affab88146 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -950,7 +950,8 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
950 | 950 | ||
951 | static int __init init_flat_binfmt(void) | 951 | static int __init init_flat_binfmt(void) |
952 | { | 952 | { |
953 | return register_binfmt(&flat_format); | 953 | register_binfmt(&flat_format); |
954 | return 0; | ||
954 | } | 955 | } |
955 | 956 | ||
956 | /****************************************************************************/ | 957 | /****************************************************************************/ |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index a9198dfd5f85..1ffb60355cae 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -726,11 +726,8 @@ static struct file_system_type bm_fs_type = { | |||
726 | static int __init init_misc_binfmt(void) | 726 | static int __init init_misc_binfmt(void) |
727 | { | 727 | { |
728 | int err = register_filesystem(&bm_fs_type); | 728 | int err = register_filesystem(&bm_fs_type); |
729 | if (!err) { | 729 | if (!err) |
730 | err = insert_binfmt(&misc_format); | 730 | insert_binfmt(&misc_format); |
731 | if (err) | ||
732 | unregister_filesystem(&bm_fs_type); | ||
733 | } | ||
734 | return err; | 731 | return err; |
735 | } | 732 | } |
736 | 733 | ||
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 396a9884591f..d3b8c1f63155 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c | |||
@@ -105,7 +105,8 @@ static struct linux_binfmt script_format = { | |||
105 | 105 | ||
106 | static int __init init_script_binfmt(void) | 106 | static int __init init_script_binfmt(void) |
107 | { | 107 | { |
108 | return register_binfmt(&script_format); | 108 | register_binfmt(&script_format); |
109 | return 0; | ||
109 | } | 110 | } |
110 | 111 | ||
111 | static void __exit exit_script_binfmt(void) | 112 | static void __exit exit_script_binfmt(void) |
diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c index cc8560f6c9b0..ec15972dd98a 100644 --- a/fs/binfmt_som.c +++ b/fs/binfmt_som.c | |||
@@ -289,7 +289,8 @@ static int load_som_library(struct file *f) | |||
289 | 289 | ||
290 | static int __init init_som_binfmt(void) | 290 | static int __init init_som_binfmt(void) |
291 | { | 291 | { |
292 | return register_binfmt(&som_format); | 292 | register_binfmt(&som_format); |
293 | return 0; | ||
293 | } | 294 | } |
294 | 295 | ||
295 | static void __exit exit_som_binfmt(void) | 296 | static void __exit exit_som_binfmt(void) |
@@ -79,15 +79,13 @@ static atomic_t call_count = ATOMIC_INIT(1); | |||
79 | static LIST_HEAD(formats); | 79 | static LIST_HEAD(formats); |
80 | static DEFINE_RWLOCK(binfmt_lock); | 80 | static DEFINE_RWLOCK(binfmt_lock); |
81 | 81 | ||
82 | int __register_binfmt(struct linux_binfmt * fmt, int insert) | 82 | void __register_binfmt(struct linux_binfmt * fmt, int insert) |
83 | { | 83 | { |
84 | if (!fmt) | 84 | BUG_ON(!fmt); |
85 | return -EINVAL; | ||
86 | write_lock(&binfmt_lock); | 85 | write_lock(&binfmt_lock); |
87 | insert ? list_add(&fmt->lh, &formats) : | 86 | insert ? list_add(&fmt->lh, &formats) : |
88 | list_add_tail(&fmt->lh, &formats); | 87 | list_add_tail(&fmt->lh, &formats); |
89 | write_unlock(&binfmt_lock); | 88 | write_unlock(&binfmt_lock); |
90 | return 0; | ||
91 | } | 89 | } |
92 | 90 | ||
93 | EXPORT_SYMBOL(__register_binfmt); | 91 | EXPORT_SYMBOL(__register_binfmt); |