aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom/af_netrom.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-14 20:04:34 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:59 -0400
commiteeeb03745bf9ea352df2373b9cb5fa14e60a2de0 (patch)
treee3b66df5536f04b81f0f2432399785931f20263d /net/netrom/af_netrom.c
parentac6d141dc7d1d0eeec850d1b451dca83ce649684 (diff)
[SK_BUFF]: More skb_put related conversions to skb_reset_transport_header
This is similar to the skb_reset_network_header(), i.e. at the point we reset the transport header pointer/offset skb->tail is equal to skb->data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r--net/netrom/af_netrom.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 8d0f30a015df..053fa26ff90a 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1074,6 +1074,7 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
1074 goto out; 1074 goto out;
1075 1075
1076 skb_reserve(skb, size - len); 1076 skb_reserve(skb, size - len);
1077 skb_reset_transport_header(skb);
1077 1078
1078 /* 1079 /*
1079 * Push down the NET/ROM header 1080 * Push down the NET/ROM header
@@ -1094,14 +1095,12 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
1094 /* 1095 /*
1095 * Put the data on the end 1096 * Put the data on the end
1096 */ 1097 */
1098 skb_put(skb, len);
1097 1099
1098 skb->h.raw = skb_put(skb, len);
1099
1100 asmptr = skb->h.raw;
1101 SOCK_DEBUG(sk, "NET/ROM: Appending user data\n"); 1100 SOCK_DEBUG(sk, "NET/ROM: Appending user data\n");
1102 1101
1103 /* User data follows immediately after the NET/ROM transport header */ 1102 /* User data follows immediately after the NET/ROM transport header */
1104 if (memcpy_fromiovec(asmptr, msg->msg_iov, len)) { 1103 if (memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len)) {
1105 kfree_skb(skb); 1104 kfree_skb(skb);
1106 err = -EFAULT; 1105 err = -EFAULT;
1107 goto out; 1106 goto out;