[RFC PATCH v2 06/11] kexec: replace call to copy_file_from_fd() with kernel version

Dave Young dyoung at redhat.com
Sun Jan 24 23:02:46 PST 2016


> > diff --git a/fs/exec.c b/fs/exec.c
> > index 211b81c..a5ae51e 100644
> > --- a/fs/exec.c
> > +++ b/fs/exec.c
> > @@ -884,6 +884,21 @@ out:
> >  }
> >  EXPORT_SYMBOL_GPL(kernel_read_file);
> >  
> > +int kernel_read_file_from_fd(int fd, void **buf, loff_t *size, loff_t max_size,
> > +			     int policy_id)
> 
> Though this is only used in kexec now, it looks more a general function, move it
> to general code should be fine along with kernel_read_file 

Oops, seems I misread exec.c as kexec.c



More information about the kexec mailing list