summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-19 01:28:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-19 01:28:40 +0000
commit8abb719409c9060a7c0676f76e9182c1e0b8ca46 (patch)
treeb88cc5a6cd513a04a512b7e6215c873c90a1c5dd /fs/binfmt_elf.c
parentf01bd7aeafd95a08aafc9e3636bb26974df69d82 (diff)
Merge with 2.3.99-pre1.
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 96190fed2..877d9e6d7 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -35,8 +35,6 @@
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
-#include <linux/config.h>
-
#define DLINFO_ITEMS 13
#include <linux/elf.h>
@@ -383,8 +381,7 @@ out:
#define INTERPRETER_ELF 2
-static inline int
-do_load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
+static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
{
struct file * file;
struct dentry *interpreter_dentry = NULL; /* to shut gcc up */
@@ -703,14 +700,11 @@ do_load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
if (interpreter_type != INTERPRETER_AOUT)
sys_close(elf_exec_fileno);
- if (current->exec_domain && current->exec_domain->module)
- __MOD_DEC_USE_COUNT(current->exec_domain->module);
+ put_exec_domain(current->exec_domain);
if (current->binfmt && current->binfmt->module)
__MOD_DEC_USE_COUNT(current->binfmt->module);
current->exec_domain = lookup_exec_domain(current->personality);
current->binfmt = &elf_format;
- if (current->exec_domain && current->exec_domain->module)
- __MOD_INC_USE_COUNT(current->exec_domain->module);
if (current->binfmt && current->binfmt->module)
__MOD_INC_USE_COUNT(current->binfmt->module);
@@ -800,22 +794,10 @@ out_free_ph:
goto out;
}
-static int
-load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_binary(bprm, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
/* This is really simpleminded and specialized - we are loading an
a.out library that is given an ELF header. */
-static inline int
-do_load_elf_library(int fd)
+static int load_elf_library(int fd)
{
struct file * file;
struct dentry * dentry;
@@ -907,16 +889,6 @@ out:
return error;
}
-static int load_elf_library(int fd)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_library(fd);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
/*
* Note that some platforms still use traditional core dumps and not
* the ELF core dump. Each platform can select it as appropriate.
@@ -1069,10 +1041,6 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
elf_fpregset_t fpu; /* NT_PRFPREG */
struct elf_prpsinfo psinfo; /* NT_PRPSINFO */
-#ifndef CONFIG_BINFMT_ELF
- MOD_INC_USE_COUNT;
-#endif
-
/* Count what's needed to dump, up to the limit of coredump size */
segs = 0;
size = 0;
@@ -1302,9 +1270,6 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
end_coredump:
set_fs(fs);
-#ifndef CONFIG_BINFMT_ELF
- MOD_DEC_USE_COUNT;
-#endif
return has_dumped;
}
#endif /* USE_ELF_CORE_DUMP */