IB/ipoib: Use cancel_delayed_work_sync for neigh-clean task
authorErez Shitrit <erezsh@mellanox.com>
Sun, 29 Jul 2018 08:34:52 +0000 (11:34 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 3 Aug 2018 02:27:19 +0000 (20:27 -0600)
commitcda8daf17914a261986d6d4b7294599736d5a463
tree553d54110be9ba0dd1cbd4485ea8c17a18cabdfb
parent577e07ffbad9960551a6821b74af90a216ac10e2
IB/ipoib: Use cancel_delayed_work_sync for neigh-clean task

The neigh_reap_task is self restarting, but so long as we call
cancel_delayed_work_sync() it will be guaranteed to not be running and
never start again. Thus we don't need to have the racy
IPOIB_STOP_NEIGH_GC bit, or the confusing mismatch of places sometimes
calling flush_workqueue after the cancel.

This fixes a situation where the GC work could have been left running
in some rare situations.

Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_main.c