summaryrefslogtreecommitdiff
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index a69fc4ae1c85..645f6e56f378 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1267,12 +1267,6 @@ static int notesize(struct memelfnote *en)
/* #define DEBUG */
-static int alignfile(struct coredump_params *cprm)
-{
- static const char buf[4] = { 0, };
- return dump_emit(cprm, buf, roundup(cprm->written, 4) - cprm->written);
-}
-
static int writenote(struct memelfnote *men, struct coredump_params *cprm)
{
struct elf_note en;
@@ -1281,8 +1275,8 @@ static int writenote(struct memelfnote *men, struct coredump_params *cprm)
en.n_type = men->type;
return dump_emit(cprm, &en, sizeof(en)) &&
- dump_emit(cprm, men->name, en.n_namesz) && alignfile(cprm) &&
- dump_emit(cprm, men->data, men->datasz) && alignfile(cprm);
+ dump_emit(cprm, men->name, en.n_namesz) && dump_align(cprm, 4) &&
+ dump_emit(cprm, men->data, men->datasz) && dump_align(cprm, 4);
}
static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs)