From: James Hogan Date: Mon, 9 May 2011 09:58:40 +0000 (+0100) Subject: Revert some of "binfmt_elf: cleanups" X-Git-Tag: next-20130218~110^2~57 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e93cd7b5092a41876de447ff71ac205bb9fb30c0;p=karo-tx-linux.git Revert some of "binfmt_elf: cleanups" The commit "binfmt_elf: cleanups" (f670d0ecda73b7438eec9ed108680bc5f5362ad8) removed an ifndef elf_map but this breaks compilation for metag which does define elf_map. This adds the ifndef back in as it was before, but does not affect the other cleanups made by that patch. Signed-off-by: James Hogan Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Acked-by: Mikael Pettersson --- diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 0c42cdbabecf..cfc22c9d75bc 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -321,6 +321,8 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, return 0; } +#ifndef elf_map + static unsigned long elf_map(struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type, unsigned long total_size) @@ -355,6 +357,8 @@ static unsigned long elf_map(struct file *filep, unsigned long addr, return(map_addr); } +#endif /* !elf_map */ + static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr) { int i, first_idx = -1, last_idx = -1;