]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
xfrm: optimise the use of walk list header in xfrm_policy/state_walk
authorLi RongQing <roy.qing.li@gmail.com>
Wed, 22 Apr 2015 09:09:54 +0000 (17:09 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 23 Apr 2015 09:36:06 +0000 (11:36 +0200)
commit800777026eeb33585f29608c2c6131fc66d2e218
tree23aca36cb198fa486dbb67e7ee28191e1f597db3
parent1ee5e6676bccbf7a035d8d35c143f1a61e602198
xfrm: optimise the use of walk list header in xfrm_policy/state_walk

The walk from input is the list header, and marked as dead, and will
be skipped in loop.

list_first_entry() can be used to return the true usable value from
walk if walk is not empty

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c