net/mlx4_en: do batched put_page using atomic_sub
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Mon, 18 Apr 2016 11:34:05 +0000 (14:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2016 00:04:24 +0000 (20:04 -0400)
commit851b10d60879539bec8acecb35ed361393399282
tree33f99b2a2017827402ed7b9215e249867ab56cbd
parent04aeb56a173282210c5dab5c9b3071fa3613806f
net/mlx4_en: do batched put_page using atomic_sub

This patch fixes couple error paths after allocation failures.
Atomic set of page reference counter is safe only if it is zero,
otherwise set can race with any speculative get_page_unless_zero.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c