Merge tag 'powerpc-5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git] / fs / binfmt_em86.c
index f33fa66..06b9b9f 100644 (file)
@@ -48,10 +48,6 @@ static int load_em86(struct linux_binprm *bprm)
        if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE)
                return -ENOENT;
 
-       allow_write_access(bprm->file);
-       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!
         */
@@ -89,13 +85,8 @@ static int load_em86(struct linux_binprm *bprm)
        if (IS_ERR(file))
                return PTR_ERR(file);
 
-       bprm->file = file;
-
-       retval = prepare_binprm(bprm);
-       if (retval < 0)
-               return retval;
-
-       return search_binary_handler(bprm);
+       bprm->interpreter = file;
+       return 0;
 }
 
 static struct linux_binfmt em86_format = {