diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-06-12 06:27:11 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-06-12 06:28:09 +0200 |
commit | 9c1d5284c79fea050f115eadeec1dd1758e5c630 (patch) | |
tree | 4d16fd5aad7ff4931e985c0128c5747f23561f8a /net/batman-adv/fragmentation.c | |
parent | kill generic_file_splice_write() (diff) | |
parent | dcache: add missing lockdep annotation (diff) | |
download | linux-9c1d5284c79fea050f115eadeec1dd1758e5c630.tar.xz linux-9c1d5284c79fea050f115eadeec1dd1758e5c630.zip |
Merge commit '9f12600fe425bc28f0ccba034a77783c09c15af4' into for-linus
Backmerge of dcache.c changes from mainline. It's that, or complete
rebase...
Conflicts:
fs/splice.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/batman-adv/fragmentation.c')
-rw-r--r-- | net/batman-adv/fragmentation.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c index bcc4bea632fa..f14e54a05691 100644 --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c @@ -418,12 +418,13 @@ bool batadv_frag_send_packet(struct sk_buff *skb, struct batadv_neigh_node *neigh_node) { struct batadv_priv *bat_priv; - struct batadv_hard_iface *primary_if; + struct batadv_hard_iface *primary_if = NULL; struct batadv_frag_packet frag_header; struct sk_buff *skb_fragment; unsigned mtu = neigh_node->if_incoming->net_dev->mtu; unsigned header_size = sizeof(frag_header); unsigned max_fragment_size, max_packet_size; + bool ret = false; /* To avoid merge and refragmentation at next-hops we never send * fragments larger than BATADV_FRAG_MAX_FRAG_SIZE @@ -483,7 +484,11 @@ bool batadv_frag_send_packet(struct sk_buff *skb, skb->len + ETH_HLEN); batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); - return true; + ret = true; + out_err: - return false; + if (primary_if) + batadv_hardif_free_ref(primary_if); + + return ret; } |