Re: [PATCH 1/4] bonding: Fix work initing and cancelling

2008-01-15 Thread Makito SHIOKAWA
I wonder why don't you use cancel_delayed_work_sync() here (and in a few other places), like in bond_work_cancel_all() from patch 2/4? In bond_close(), you can't use cancel_delayed_work_sync() because you can't unlock RTNL in it. (So, on current implementation, it becomes work cancel is not ensur

Re: [PATCH 1/4] bonding: Fix work initing and cancelling

2008-01-15 Thread Jarek Poplawski
On 15-01-2008 07:36, Makito SHIOKAWA wrote: ... > --- a/drivers/net/bonding/bond_sysfs.c > +++ b/drivers/net/bonding/bond_sysfs.c > @@ -643,10 +643,8 @@ static ssize_t bonding_store_arp_interva > "%s Disabling MII monitoring.\n", > bond->dev->name, bond->de

[PATCH 1/4] bonding: Fix work initing and cancelling

2008-01-14 Thread Makito SHIOKAWA
delayed_work_pending() is used to check whether work is being queued or not, when queueing or cancelling corresponding work. However, delayed_work_pending() returns 0 when work is just running, and in that case, work_struct will be destroyed or work won't be cancelled. So remove all delayed_work_pe