exec: make prepare_bprm_creds static
authorChanho Min <chanho.min@lge.com>
Mon, 10 Dec 2018 07:49:54 +0000 (16:49 +0900)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 10 Dec 2018 09:11:06 +0000 (04:11 -0500)
prepare_bprm_creds is not used outside exec.c, so there's no reason for it
to have external linkage.

Signed-off-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exec.c
include/linux/binfmts.h

index fc281b738a9822a652f7d19bb60ae15acd7a7ebf..b6c9e5f9f330f04a98f8ba47821ea9a6fa0d947d 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1399,7 +1399,7 @@ EXPORT_SYMBOL(finalize_exec);
  * Or, if exec fails before, free_bprm() should release ->cred and
  * and unlock.
  */
-int prepare_bprm_creds(struct linux_binprm *bprm)
+static int prepare_bprm_creds(struct linux_binprm *bprm)
 {
        if (mutex_lock_interruptible(&current->signal->cred_guard_mutex))
                return -ERESTARTNOINTR;
index e9f5fe69df312d022648dd69e21ca00d2daf45a5..6a9e43d98c3d0ef0753047053b0d552909c0a0f0 100644 (file)
@@ -138,7 +138,6 @@ extern int transfer_args_to_stack(struct linux_binprm *bprm,
 extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
 extern int copy_strings_kernel(int argc, const char *const *argv,
                               struct linux_binprm *bprm);
-extern int prepare_bprm_creds(struct linux_binprm *bprm);
 extern void install_exec_creds(struct linux_binprm *bprm);
 extern void set_binfmt(struct linux_binfmt *new);
 extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t);