patch-2.3.99-pre3 linux/fs/binfmt_misc.c
Next file: linux/fs/binfmt_script.c
Previous file: linux/fs/binfmt_em86.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Wed Mar 22 22:15:57 2000
- Orig file:
v2.3.99-pre2/linux/fs/binfmt_misc.c
- Orig date:
Sun Mar 19 18:35:31 2000
diff -u --recursive --new-file v2.3.99-pre2/linux/fs/binfmt_misc.c linux/fs/binfmt_misc.c
@@ -27,6 +27,7 @@
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/ctype.h>
+#include <linux/file.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
@@ -180,7 +181,7 @@
static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
{
struct binfmt_entry *fmt;
- struct dentry * dentry;
+ struct file * file;
char iname[128];
char *iname_addr = iname;
int retval;
@@ -200,8 +201,8 @@
if (!fmt)
goto _ret;
- dput(bprm->dentry);
- bprm->dentry = NULL;
+ fput(bprm->file);
+ bprm->file = NULL;
/* Build args for interpreter */
remove_arg_zero(bprm);
@@ -213,11 +214,11 @@
bprm->argc++;
bprm->filename = iname; /* for binfmt_script */
- dentry = open_namei(iname);
- retval = PTR_ERR(dentry);
- if (IS_ERR(dentry))
+ file = open_exec(iname);
+ retval = PTR_ERR(file);
+ if (IS_ERR(file))
goto _ret;
- bprm->dentry = dentry;
+ bprm->file = file;
retval = prepare_binprm(bprm);
if (retval >= 0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)