Merge "net: qrtr: Use alloc_skb_with_frags for backup memory"
This commit is contained in:
commit
1db7cf56c0
1 changed files with 7 additions and 2 deletions
|
@ -696,15 +696,20 @@ EXPORT_SYMBOL(qrtr_peek_pkt_size);
|
||||||
static void qrtr_alloc_backup(struct work_struct *work)
|
static void qrtr_alloc_backup(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
int errcode;
|
||||||
|
|
||||||
while (skb_queue_len(&qrtr_backup_lo) < QRTR_BACKUP_LO_NUM) {
|
while (skb_queue_len(&qrtr_backup_lo) < QRTR_BACKUP_LO_NUM) {
|
||||||
skb = alloc_skb(QRTR_BACKUP_LO_SIZE, GFP_KERNEL);
|
skb = alloc_skb_with_frags(sizeof(struct qrtr_hdr_v1),
|
||||||
|
QRTR_BACKUP_LO_SIZE, 0, &errcode,
|
||||||
|
GFP_KERNEL);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
break;
|
break;
|
||||||
skb_queue_tail(&qrtr_backup_lo, skb);
|
skb_queue_tail(&qrtr_backup_lo, skb);
|
||||||
}
|
}
|
||||||
while (skb_queue_len(&qrtr_backup_hi) < QRTR_BACKUP_HI_NUM) {
|
while (skb_queue_len(&qrtr_backup_hi) < QRTR_BACKUP_HI_NUM) {
|
||||||
skb = alloc_skb(QRTR_BACKUP_HI_SIZE, GFP_KERNEL);
|
skb = alloc_skb_with_frags(sizeof(struct qrtr_hdr_v1),
|
||||||
|
QRTR_BACKUP_HI_SIZE, 0, &errcode,
|
||||||
|
GFP_KERNEL);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
break;
|
break;
|
||||||
skb_queue_tail(&qrtr_backup_hi, skb);
|
skb_queue_tail(&qrtr_backup_hi, skb);
|
||||||
|
|
Loading…
Reference in a new issue