workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()
Subsystems (20)
Tejun Heo
maintainerPATCH 1/2 workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()
cancel_rearming_delayed_work[queue]() has been superceded by cancel_delayed_work_sync() quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial.
---
These two patches convert all cancel_rearming users and deprecate the two long obsolete functions. Unless someone objects, I'll push these two through the workqueue tree in the next merge window. The next patch will mark the two functions __deprecated and schedule for removal during 2.6.39 cycle.
Thank you.
drivers/ata/libata-core.c | 2 +- drivers/ata/libata-sff.c | 2 +- drivers/macintosh/rack-meter.c | 4 ++-- drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 2 +- drivers/media/video/em28xx/em28xx-input.c | 2 +- drivers/net/chelsio/my3126.c | 2 +- drivers/net/ibm_newemac/core.c | 4 ++-- drivers/net/wireless/zd1211rw/zd_mac.c | 3 +-- drivers/power/ds2760_battery.c | 6 ++---- drivers/power/intel_mid_battery.c | 6 ++---- drivers/staging/pohmelfs/inode.c | 4 ++-- drivers/usb/atm/cxacru.c | 2 +- drivers/video/fb_defio.c | 2 +- drivers/video/omap/lcd_mipid.c | 2 +- fs/nfsd/nfs4state.c | 2 +- fs/xfs/xfs_mru_cache.c | 2 +- mm/slab.c | 2 +- mm/vmstat.c | 2 +- net/atm/lec.c | 2 +- net/core/netpoll.c | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 2 +- net/sunrpc/xprtsock.c | 2 +- 22 files changed, 27 insertions(+), 32 deletions(-)
drivers/ata/libata-core.c +1 -1
@@ -6122,7 +6122,7 @@ static void ata_port_detach(struct ata_port *ap)/* it better be dead now */ WARN_ON (!(ap->pflags &ATA_PFLAG_UNLOADED )); -cancel_rearming_delayed_work (&ap->hotplug_task); +cancel_delayed_work_sync (&ap->hotplug_task); skip_eh:if (ap->pmp_link) {
drivers/ata/libata-sff.c +1 -1
@@ -1320,7 +1320,7 @@ void ata_sff_flush_pio_task(struct ata_port *ap) {DPRINTK ("ENTER\n" ); -cancel_rearming_delayed_work (&ap->sff_pio_task); +cancel_delayed_work_sync (&ap->sff_pio_task); ap->hsm_task_state =HSM_ST_IDLE ;if (ata_msg_ctl (ap))
drivers/macintosh/rack-meter.c +2 -2
@@ -285,8 +285,8 @@ static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) static void __devexit rackmeter_stop_cpu_sniffer(struct rackmeter *rm) { -cancel_rearming_delayed_work (&rm->cpu[0 ].sniffer); -cancel_rearming_delayed_work (&rm->cpu[1 ].sniffer); +cancel_delayed_work_sync (&rm->cpu[0 ].sniffer); +cancel_delayed_work_sync (&rm->cpu[1 ].sniffer); }static int __devinit rackmeter_setup (struct rackmeter *rm)
drivers/media/dvb/dvb-usb/dvb-usb-remote.c +1 -1
@@ -298,7 +298,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)int dvb_usb_remote_exit (struct dvb_usb_device *d) {if (d->state &DVB_USB_STATE_REMOTE ) { -cancel_rearming_delayed_work (&d->rc_query_work); +cancel_delayed_work_sync (&d->rc_query_work);flush_scheduled_work ();if (d->props.rc.mode ==DVB_RC_LEGACY )input_unregister_device (d->rc_input_dev);
drivers/media/video/em28xx/em28xx-input.c +1 -1
@@ -557,7 +557,7 @@ void em28xx_deregister_snapshot_button(struct em28xx *dev) {if (dev->sbutton_input_dev !=NULL ) {em28xx_info ("Deregistering snapshot button\n" ); -cancel_rearming_delayed_work (&dev->sbutton_query_work); +cancel_delayed_work_sync (&dev->sbutton_query_work);input_unregister_device (dev->sbutton_input_dev); dev->sbutton_input_dev =NULL ; }
drivers/net/chelsio/my3126.c +1 -1
@@ -22,7 +22,7 @@ static int my3126_interrupt_enable(struct cphy *cphy)static int my3126_interrupt_disable (struct cphy *cphy) { -cancel_rearming_delayed_work (&cphy->phy_update); +cancel_delayed_work_sync (&cphy->phy_update);return 0 ; }
drivers/net/ibm_newemac/core.c +2 -2
@@ -1279,7 +1279,7 @@ static void emac_force_link_update(struct emac_instance *dev)netif_carrier_off (dev->ndev);smp_rmb ();if (dev->link_polling) { -cancel_rearming_delayed_work (&dev->link_work); +cancel_delayed_work_sync (&dev->link_work);if (dev->link_polling)schedule_delayed_work (&dev->link_work,PHY_POLL_LINK_OFF ); }
@@ -1294,7 +1294,7 @@ static int emac_close(struct net_device *ndev)if (dev->phy.address >=0 ) { dev->link_polling =0 ; -cancel_rearming_delayed_work (&dev->link_work); +cancel_delayed_work_sync (&dev->link_work); }mutex_lock (&dev->link_lock);emac_netif_stop (dev);
drivers/net/wireless/zd1211rw/zd_mac.c +1 -2
@@ -1207,7 +1207,6 @@ static void housekeeping_enable(struct zd_mac *mac)static void housekeeping_disable (struct zd_mac *mac) {dev_dbg_f (zd_mac_dev (mac),"\n" ); -cancel_rearming_delayed_workqueue (zd_workqueue, - &mac->housekeeping.link_led_work); +cancel_delayed_work_sync (&mac->housekeeping.link_led_work);zd_chip_control_leds (&mac->chip,ZD_LED_OFF ); }
drivers/power/ds2760_battery.c +2 -4
@@ -580,10 +580,8 @@ static int ds2760_battery_remove(struct platform_device *pdev) {struct ds2760_device_info *di =platform_get_drvdata (pdev); -cancel_rearming_delayed_workqueue (di->monitor_wqueue, - &di->monitor_work); -cancel_rearming_delayed_workqueue (di->monitor_wqueue, - &di->set_charged_work); +cancel_delayed_work_sync (&di->monitor_work); +cancel_delayed_work_sync (&di->set_charged_work);destroy_workqueue (di->monitor_wqueue);power_supply_unregister (&di->bat);kfree (di);
drivers/power/intel_mid_battery.c +2 -4
@@ -730,8 +730,7 @@ static __devinit int probe(int irq, struct device *dev) power_reg_failed_1:power_supply_unregister (&pbi->batt); power_reg_failed: -cancel_rearming_delayed_workqueue (pbi->monitor_wqueue, - &pbi->monitor_battery); +cancel_delayed_work_sync (&pbi->monitor_battery); requestirq_failed:destroy_workqueue (pbi->monitor_wqueue); wqueue_failed:
@@ -760,8 +759,7 @@ static int __devexit platform_pmic_battery_remove(struct platform_device *pdev)struct pmic_power_module_info *pbi =dev_get_drvdata (&pdev->dev);free_irq (pbi->irq, pbi); -cancel_rearming_delayed_workqueue (pbi->monitor_wqueue, - &pbi->monitor_battery); +cancel_delayed_work_sync (&pbi->monitor_battery);destroy_workqueue (pbi->monitor_wqueue);power_supply_unregister (&pbi->usb);
drivers/staging/pohmelfs/inode.c +2 -2
@@ -1318,8 +1318,8 @@ static void pohmelfs_put_super(struct super_block *sb) } psb->trans_scan_timeout = psb->drop_scan_timeout =0 ; -cancel_rearming_delayed_work (&psb->dwork); -cancel_rearming_delayed_work (&psb->drop_dwork); +cancel_delayed_work_sync (&psb->dwork); +cancel_delayed_work_sync (&psb->drop_dwork);flush_scheduled_work ();dprintk ("%s: stopped workqueues.\n" , __func__);
drivers/usb/atm/cxacru.c +1 -1
@@ -1247,7 +1247,7 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance,mutex_unlock (&instance->poll_state_serialize);if (is_polling) -cancel_rearming_delayed_work (&instance->poll_work); +cancel_delayed_work_sync (&instance->poll_work);usb_kill_urb (instance->snd_urb);usb_kill_urb (instance->rcv_urb);
drivers/video/fb_defio.c +1 -1
@@ -75,7 +75,7 @@ int fb_deferred_io_fsync(struct file *file, int datasync)return 0 ;/* Kill off the delayed work */ -cancel_rearming_delayed_work (&info->deferred_work); +cancel_delayed_work_sync (&info->deferred_work);/* Run it immediately */ return schedule_delayed_work (&info->deferred_work,0 );
drivers/video/omap/lcd_mipid.c +1 -1
@@ -396,7 +396,7 @@ static void mipid_esd_start_check(struct mipid_device *md)static void mipid_esd_stop_check (struct mipid_device *md) {if (md->esd_check !=NULL ) -cancel_rearming_delayed_workqueue (md->esd_wq, &md->esd_work); +cancel_delayed_work_sync (&md->esd_work); }static void mipid_esd_work (struct work_struct *work)
fs/nfsd/nfs4state.c +1 -1
@@ -4336,7 +4336,7 @@ __nfs4_state_shutdown(void)void nfs4_state_shutdown (void ) { -cancel_rearming_delayed_workqueue (laundry_wq, &laundromat_work); +cancel_delayed_work_sync (&laundromat_work);destroy_workqueue (laundry_wq);locks_end_grace (&nfsd4_manager);nfs4_lock_state ();
fs/xfs/xfs_mru_cache.c +1 -1
@@ -408,7 +408,7 @@ xfs_mru_cache_flush(spin_lock (&mru->lock);if (mru->queued) {spin_unlock (&mru->lock); -cancel_rearming_delayed_workqueue (xfs_mru_reap_wq, &mru->work); +cancel_delayed_work_sync (&mru->work);spin_lock (&mru->lock); }
mm/slab.c +1 -1
@@ -1293,7 +1293,7 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,* anything expensive but will only modify reap_work * and reschedule the timer. */ -cancel_rearming_delayed_work (&per_cpu (slab_reap_work, cpu)); +cancel_delayed_work_sync (&per_cpu (slab_reap_work, cpu));/* Now the cache_reaper is guaranteed to be not running. */ per_cpu (slab_reap_work, cpu).work.func =NULL ;break ;
mm/vmstat.c +1 -1
@@ -1033,7 +1033,7 @@ static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,break ;case CPU_DOWN_PREPARE :case CPU_DOWN_PREPARE_FROZEN : -cancel_rearming_delayed_work (&per_cpu (vmstat_work, cpu)); +cancel_delayed_work_sync (&per_cpu (vmstat_work, cpu));per_cpu (vmstat_work, cpu).work.func =NULL ;break ;case CPU_DOWN_FAILED :
net/atm/lec.c +1 -1
@@ -1608,7 +1608,7 @@ static void lec_arp_destroy(struct lec_priv *priv)struct lec_arp_table *entry;int i; -cancel_rearming_delayed_work (&priv->lec_arp_work); +cancel_delayed_work_sync (&priv->lec_arp_work);/* * Remove all entries
net/core/netpoll.c +1 -1
@@ -925,7 +925,7 @@ void __netpoll_cleanup(struct netpoll *np)skb_queue_purge (&npinfo->arp_tx);skb_queue_purge (&npinfo->txq); -cancel_rearming_delayed_work (&npinfo->tx_work); +cancel_delayed_work_sync (&npinfo->tx_work);/* clean after last, unfinished work */ __skb_queue_purge (&npinfo->txq);
net/netfilter/ipvs/ip_vs_ctl.c +1 -1
@@ -3432,7 +3432,7 @@ void ip_vs_control_cleanup(void) {EnterFunction (2 );ip_vs_trash_cleanup (); -cancel_rearming_delayed_work (&defense_work); +cancel_delayed_work_sync (&defense_work);cancel_work_sync (&defense_work.work);ip_vs_kill_estimator (&ip_vs_stats);unregister_sysctl_table (sysctl_header);
net/sunrpc/xprtsock.c +1 -1
@@ -770,7 +770,7 @@ static void xs_destroy(struct rpc_xprt *xprt)dprintk ("RPC: xs_destroy xprt %p\n" , xprt); -cancel_rearming_delayed_work (&transport->connect_worker); +cancel_delayed_work_sync (&transport->connect_worker);xs_close (xprt);xs_free_peer_addresses (xprt);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Tejun Heo
maintainerPATCH 2/2 workqueue: deprecate cancel_rearming_delayed_work[queue]()
There's no in-kernel user left for these two obsolete functions. Mark them deprecated and schedule for removal during 2.6.39 cycle.
--- Documentation/feature-removal-schedule.txt | 10 ++++++++++ include/linux/workqueue.h | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-)
Documentation/feature-removal-schedule.txt +10 -0
@@ -564,3 +564,13 @@ Why: This field is deprecated. I2C device drivers shouldn't change their Who: Jean Delvare <[email protected]> ---------------------------- + +What: cancel_rearming_delayed_work[queue]() +When: 2.6.39 + +Why: The functions have been superceded by cancel_delayed_work_sync() + quite some time ago. The conversion is trivial and there is no + in-kernel user left. +Who: Tejun Heo <[email protected]> + +----------------------------
include/linux/workqueue.h +2 -2
@@ -401,7 +401,7 @@ static inline bool __cancel_delayed_work(struct delayed_work *work) }/* Obsolete. use cancel_delayed_work_sync() */ -static inline +static inline __deprecated void cancel_rearming_delayed_workqueue (struct workqueue_struct *wq,struct delayed_work *work) {
@@ -409,7 +409,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, }/* Obsolete. use cancel_delayed_work_sync() */ -static inline +static inline __deprecated void cancel_rearming_delayed_work (struct delayed_work *work) {cancel_delayed_work_sync (work);
Re: [PATCH 2/2] workqueue: deprecate cancel_rearming_delayed_work[queue]()
From: Tejun Heo <[email protected]>
Date: Tue, 14 Dec 2010 16:23:10 +0100
Quoted 4 lines
There's no in-kernel user left for these two obsolete functions. Mark them deprecated and schedule for removal during 2.6.39 cycle.
Signed-off-by Tejun Heo <[email protected]>
Quoted 5 lines · Tejun Heo
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync()quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial.
Quoted 10 lines
Signed-off-by Tejun Heo <[email protected]>Cc Jeff Garzik <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Cc "David S. Miller" <[email protected]>Cc Anton Vorontsov <[email protected]>Cc David Woodhouse <[email protected]>Cc Evgeniy Polyakov <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
From: Tejun Heo <[email protected]>
Date: Tue, 14 Dec 2010 16:21:17 +0100
Quoted 6 lines
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync()quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial.Signed-off-by Tejun Heo <[email protected]>
Hi.
Quoted 6 lines · Tejun Heo
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync()quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial.Signed-off-by Tejun Heo <[email protected]>
Signature · 1 line
Evgeniy Polyakov