projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af3dc0a
)
net: remove redundant check in skb_shift()
author
Zhang Changzhong
<zhangchangzhong@huawei.com>
Thu, 15 Aug 2024 14:09:42 +0000
(22:09 +0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Tue, 20 Aug 2024 01:20:18 +0000
(18:20 -0700)
The check for '!to' is redundant here, since skb_can_coalesce() already
contains this check.
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link:
https://patch.msgid.link/1723730983-22912-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/skbuff.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/skbuff.c
b/net/core/skbuff.c
index de2a044cc66567f4fb5bd4d8c4a6425a577ddb12..1748673e1fe0bb178a493d7ff4f7891214a61ed1 100644
(file)
--- a/
net/core/skbuff.c
+++ b/
net/core/skbuff.c
@@
-4172,8
+4172,7
@@
int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
/* Actual merge is delayed until the point when we know we can
* commit all, so that we don't have to undo partial changes
*/
- if (!to ||
- !skb_can_coalesce(tgt, to, skb_frag_page(fragfrom),
+ if (!skb_can_coalesce(tgt, to, skb_frag_page(fragfrom),
skb_frag_off(fragfrom))) {
merge = -1;
} else {