@@ -478,6 +478,7 @@ struct ubuf_info {
};
};
refcount_t refcnt;
+ u8 zc_flags;
struct mmpin {
struct user_struct *user;
@@ -1454,7 +1455,7 @@ static inline void skb_zcopy_set(struct sk_buff *skb, struct ubuf_info *uarg,
else
skb_zcopy_get(uarg);
skb_shinfo(skb)->destructor_arg = uarg;
- skb_shinfo(skb)->zc_flags |= SKBZC_FRAGMENTS;
+ skb_shinfo(skb)->zc_flags |= uarg->zc_flags;
}
}
@@ -1118,6 +1118,7 @@ struct ubuf_info *sock_zerocopy_alloc(struct sock *sk, size_t size)
uarg->len = 1;
uarg->bytelen = size;
uarg->zerocopy = 1;
+ uarg->zc_flags = SKBZC_FRAGMENTS;
refcount_set(&uarg->refcnt, 1);
sock_hold(sk);