Skip to content

Commit d2d11f3

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull ELF fix from Al Viro: "One of the many equivalent build warning fixes for !CONFIG_ELF_CORE configs. Geert's is the earliest one I've been able to find" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump: Move dump_emit_page() to kill unused warning
2 parents 4ec5183 + 9c7417b commit d2d11f3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

fs/coredump.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,30 @@ static int __dump_skip(struct coredump_params *cprm, size_t nr)
838838
}
839839
}
840840

841+
int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
842+
{
843+
if (cprm->to_skip) {
844+
if (!__dump_skip(cprm, cprm->to_skip))
845+
return 0;
846+
cprm->to_skip = 0;
847+
}
848+
return __dump_emit(cprm, addr, nr);
849+
}
850+
EXPORT_SYMBOL(dump_emit);
851+
852+
void dump_skip_to(struct coredump_params *cprm, unsigned long pos)
853+
{
854+
cprm->to_skip = pos - cprm->pos;
855+
}
856+
EXPORT_SYMBOL(dump_skip_to);
857+
858+
void dump_skip(struct coredump_params *cprm, size_t nr)
859+
{
860+
cprm->to_skip += nr;
861+
}
862+
EXPORT_SYMBOL(dump_skip);
863+
864+
#ifdef CONFIG_ELF_CORE
841865
static int dump_emit_page(struct coredump_params *cprm, struct page *page)
842866
{
843867
struct bio_vec bvec = {
@@ -871,30 +895,6 @@ static int dump_emit_page(struct coredump_params *cprm, struct page *page)
871895
return 1;
872896
}
873897

874-
int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
875-
{
876-
if (cprm->to_skip) {
877-
if (!__dump_skip(cprm, cprm->to_skip))
878-
return 0;
879-
cprm->to_skip = 0;
880-
}
881-
return __dump_emit(cprm, addr, nr);
882-
}
883-
EXPORT_SYMBOL(dump_emit);
884-
885-
void dump_skip_to(struct coredump_params *cprm, unsigned long pos)
886-
{
887-
cprm->to_skip = pos - cprm->pos;
888-
}
889-
EXPORT_SYMBOL(dump_skip_to);
890-
891-
void dump_skip(struct coredump_params *cprm, size_t nr)
892-
{
893-
cprm->to_skip += nr;
894-
}
895-
EXPORT_SYMBOL(dump_skip);
896-
897-
#ifdef CONFIG_ELF_CORE
898898
int dump_user_range(struct coredump_params *cprm, unsigned long start,
899899
unsigned long len)
900900
{

0 commit comments

Comments
 (0)