Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932634Ab1BYSDN (ORCPT ); Fri, 25 Feb 2011 13:03:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62392 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756380Ab1BYSC6 (ORCPT ); Fri, 25 Feb 2011 13:02:58 -0500 Date: Fri, 25 Feb 2011 18:53:37 +0100 From: Oleg Nesterov To: Andrew Morton Cc: KOSAKI Motohiro , Linus Torvalds , LKML , linux-mm , pageexec@freemail.hu, Solar Designer , Eugene Teo , Brad Spengler , Roland McGrath , Milton Miller Subject: [PATCH 4/5] exec: unexport acct_arg_size() and get_arg_page() Message-ID: <20110225175337.GE19059@redhat.com> References: <20101130200129.GG11905@redhat.com> <20101201182747.GB6143@redhat.com> <20110225175202.GA19059@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110225175202.GA19059@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2145 Lines: 63 Unexport acct_arg_size() and get_arg_page(), fs/compat.c doesn't need them any longer. Signed-off-by: Oleg Nesterov --- include/linux/binfmts.h | 4 ---- fs/exec.c | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) --- 38/include/linux/binfmts.h~4_unexport_arg_helpers 2011-02-25 18:01:57.000000000 +0100 +++ 38/include/linux/binfmts.h 2011-02-25 18:05:27.000000000 +0100 @@ -60,10 +60,6 @@ struct linux_binprm { unsigned long loader, exec; }; -extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages); -extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, - int write); - #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) --- 38/fs/exec.c~4_unexport_arg_helpers 2011-02-25 18:05:17.000000000 +0100 +++ 38/fs/exec.c 2011-02-25 18:05:27.000000000 +0100 @@ -165,7 +165,7 @@ out: #ifdef CONFIG_MMU -void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) +static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) { struct mm_struct *mm = current->mm; long diff = (long)(pages - bprm->vma_pages); @@ -184,7 +184,7 @@ void acct_arg_size(struct linux_binprm * #endif } -struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, +static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; @@ -303,11 +303,11 @@ static bool valid_arg_len(struct linux_b #else -void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) +static inline void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) { } -struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, +static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/