summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-policy-internal.h
diff options
context:
space:
mode:
authorVeaceslav Falico2013-06-24 11:49:29 +0200
committerDavid S. Miller2013-06-26 01:58:37 +0200
commit87a7b84b588c2ddbde890890855aef18ec34174e (patch)
tree5c050d6899bcb84d0366dedefbf690e8fbdc3dc1 /drivers/md/dm-cache-policy-internal.h
parentnet: davinci_mdio: gaurd the DT code with IS_ENABLED(CONFIG_OF) (diff)
downloadkernel-qcow2-linux-87a7b84b588c2ddbde890890855aef18ec34174e.tar.gz
kernel-qcow2-linux-87a7b84b588c2ddbde890890855aef18ec34174e.tar.xz
kernel-qcow2-linux-87a7b84b588c2ddbde890890855aef18ec34174e.zip
bonding: add helper function bond_get_targets_ip(targets, ip)
Add function bond_get_targets_ip(targets, ip) which searches through targets array of ips (arp_targets) and returns the position of first match. If ip == 0, returns the first free slot. On failure to find the ip or free slot, return -1. Use it to verify if the arp we've received is valid and in sysfs. v1->v2: Fix "[2/6] bonding: add helper function bond_get_targets_ip(targets, ip)", per Nikolay's advice, to verify if source ip != 0.0.0.0, otherwise we might update 'null' arp_ip_targets' last_rx. Also, address style. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/md/dm-cache-policy-internal.h')
0 files changed, 0 insertions, 0 deletions