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

From: Jarek Poplawski <[email-masked]>
Date: Tue, 15 Jan 2008 11:56:01 +0100

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->dev->name);
>  		bond->params.miimon = 0;
> -		if (delayed_work_pending(&bond->mii_work)) {
> -			cancel_delayed_work(&bond->mii_work);
> -			flush_workqueue(bond->wq);
> -		}
> +		cancel_delayed_work(&bond->mii_work);
> +		flush_workqueue(bond->wq);

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?

Regards,
Jarek P.