binfmt_misc cleanup [PATCH]

Richard Guenther (zxmpm11@student.uni-tuebingen.de)
Fri, 24 Apr 1998 12:20:42 +0200 (METDST)


Hi Linus!

Could you please apply this small patch that removes
unnecessary code from binfmt_misc?

Richard.

--
Richard Guenther <richard.guenther@student.uni-tuebingen.de>
PGP: 2E829319 - 2F 83 FC 93 E9 E4 19 E2 93 7A 32 42 45 37 23 57
WWW: http://www.anatom.uni-tuebingen.de/~richi/

--- linux-2.1.97/fs/binfmt_misc.c.original Thu Apr 23 17:34:57 1998 +++ linux-2.1.97/fs/binfmt_misc.c Thu Apr 23 17:38:23 1998 @@ -178,26 +178,23 @@ struct dentry * dentry; char iname[128]; char *iname_addr = iname; - int retval, fmt_flags = 0; + int retval; MOD_INC_USE_COUNT; - if (!enabled) { - retval = -ENOEXEC; + retval = -ENOEXEC; + if (!enabled) goto _ret; - } /* to keep locking time low, we copy the interpreter string */ read_lock(&entries_lock); - if ((fmt = check_file(bprm))) { + fmt = check_file(bprm); + if (fmt) { strncpy(iname, fmt->interpreter, 127); iname[127] = '\0'; - fmt_flags = fmt->flags; } read_unlock(&entries_lock); - if (!fmt) { - retval = -ENOEXEC; + if (!fmt) goto _ret; - } dput(bprm->dentry); bprm->dentry = NULL; @@ -208,10 +205,9 @@ bprm->argc++; bprm->p = copy_strings(1, &iname_addr, bprm->page, bprm->p, 2); bprm->argc++; - if (!bprm->p) { - retval = -E2BIG; + retval = -E2BIG; + if (!bprm->p) goto _ret; - } bprm->filename = iname; /* for binfmt_script */ dentry = open_namei(iname, 0, 0);

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu