linuxkpi: Add sg_alloc_table_from_pages_segment()
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38541
This commit is contained in:
parent
d91cf06020
commit
f3490083b7
@ -427,6 +427,20 @@ sg_alloc_table_from_pages(struct sg_table *sgt,
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int
|
||||
sg_alloc_table_from_pages_segment(struct sg_table *sgt,
|
||||
struct page **pages, unsigned int count, unsigned int off,
|
||||
unsigned long size, unsigned int max_segment, gfp_t gfp_mask)
|
||||
{
|
||||
#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300
|
||||
return (PTR_ERR_OR_ZERO(__sg_alloc_table_from_pages(sgt, pages, count, off, size,
|
||||
max_segment, NULL, 0, gfp_mask)));
|
||||
#else
|
||||
return (__sg_alloc_table_from_pages(sgt, pages, count, off, size,
|
||||
max_segment, gfp_mask));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int
|
||||
sg_nents(struct scatterlist *sg)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user