/* Returns 0 on success or -1 if the room in the socket buffer was not sufficient.  */
int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, int xstats_type, spinlock_t *lock, struct gnet_dump *d) __acquires(lock)
/* Returns 0 on success or -1 if the room in the socket buffer was not sufficient.  */
int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, int xstats_type, spinlock_t *lock, struct gnet_dump *d) __acquires(lock)
{
	memset(d, 0, sizeof(*d));
	spin_lock_bh(lock);
	d->lock = lock;
	if (type)
		d->tail = (struct nlattr *)skb_tail_pointer(skb);
	d->skb = skb;
	d->compat_tc_stats = tc_stats_type;
	d->compat_xstats = xstats_type;
	if (d->tail)
		return gnet_stats_copy(d, type, NULL, 0);
	return 0;
}