mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
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
This commit is contained in:
commit
d2d11f342b
@ -838,6 +838,30 @@ static int __dump_skip(struct coredump_params *cprm, size_t nr)
|
||||
}
|
||||
}
|
||||
|
||||
int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
|
||||
{
|
||||
if (cprm->to_skip) {
|
||||
if (!__dump_skip(cprm, cprm->to_skip))
|
||||
return 0;
|
||||
cprm->to_skip = 0;
|
||||
}
|
||||
return __dump_emit(cprm, addr, nr);
|
||||
}
|
||||
EXPORT_SYMBOL(dump_emit);
|
||||
|
||||
void dump_skip_to(struct coredump_params *cprm, unsigned long pos)
|
||||
{
|
||||
cprm->to_skip = pos - cprm->pos;
|
||||
}
|
||||
EXPORT_SYMBOL(dump_skip_to);
|
||||
|
||||
void dump_skip(struct coredump_params *cprm, size_t nr)
|
||||
{
|
||||
cprm->to_skip += nr;
|
||||
}
|
||||
EXPORT_SYMBOL(dump_skip);
|
||||
|
||||
#ifdef CONFIG_ELF_CORE
|
||||
static int dump_emit_page(struct coredump_params *cprm, struct page *page)
|
||||
{
|
||||
struct bio_vec bvec = {
|
||||
@ -871,30 +895,6 @@ static int dump_emit_page(struct coredump_params *cprm, struct page *page)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
|
||||
{
|
||||
if (cprm->to_skip) {
|
||||
if (!__dump_skip(cprm, cprm->to_skip))
|
||||
return 0;
|
||||
cprm->to_skip = 0;
|
||||
}
|
||||
return __dump_emit(cprm, addr, nr);
|
||||
}
|
||||
EXPORT_SYMBOL(dump_emit);
|
||||
|
||||
void dump_skip_to(struct coredump_params *cprm, unsigned long pos)
|
||||
{
|
||||
cprm->to_skip = pos - cprm->pos;
|
||||
}
|
||||
EXPORT_SYMBOL(dump_skip_to);
|
||||
|
||||
void dump_skip(struct coredump_params *cprm, size_t nr)
|
||||
{
|
||||
cprm->to_skip += nr;
|
||||
}
|
||||
EXPORT_SYMBOL(dump_skip);
|
||||
|
||||
#ifdef CONFIG_ELF_CORE
|
||||
int dump_user_range(struct coredump_params *cprm, unsigned long start,
|
||||
unsigned long len)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user