diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
commit | d3e71cb08747743fce908122bab08b479eb403a5 (patch) | |
tree | cbec6948fdbdee9af81cf3ecfb504070d2745d7b /fs/binfmt_em86.c | |
parent | fe7ff1706e323d0e5ed83972960a1ecc1ee538b3 (diff) |
Merge with Linux 2.3.99-pre3.
Diffstat (limited to 'fs/binfmt_em86.c')
-rw-r--r-- | fs/binfmt_em86.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 1a1533a10..1b18094eb 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c @@ -25,7 +25,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) { char *interp, *i_name, *i_arg; - struct dentry * dentry; + struct file * file; int retval; struct elfhdr elf_ex; @@ -38,16 +38,13 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) /* First of all, some simple consistency checks */ if ((elf_ex.e_type != ET_EXEC && elf_ex.e_type != ET_DYN) || (!((elf_ex.e_machine == EM_386) || (elf_ex.e_machine == EM_486))) || - (!bprm->dentry->d_inode->i_fop || - !bprm->dentry->d_inode->i_fop->mmap)) { + (!bprm->file->f_op || !bprm->file->f_op->mmap)) { return -ENOEXEC; } bprm->sh_bang++; /* Well, the bang-shell is implicit... */ - lock_kernel(); - dput(bprm->dentry); - unlock_kernel(); - bprm->dentry = NULL; + fput(bprm->file); + bprm->file = NULL; /* Unlike in the script case, we don't have to do any hairy * parsing to find our interpreter... it's hardcoded! @@ -79,16 +76,14 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) /* * OK, now restart the process with the interpreter's inode. - * Note that we use open_namei() as the name is now in kernel + * Note that we use open_exec() as the name is now in kernel * space, and we don't need to copy it. */ - lock_kernel(); - dentry = open_namei(interp); - unlock_kernel(); - if (IS_ERR(dentry)) - return PTR_ERR(dentry); + file = open_exec(interp); + if (IS_ERR(file)) + return PTR_ERR(file); - bprm->dentry = dentry; + bprm->file = file; retval = prepare_binprm(bprm); if (retval < 0) |