From: Krishna Kumar <krkumar2@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Oleg Nesterov <oleg@tv-sign.ru>, Krishna Kumar <krkumar2@in.ibm.com>
Subject: [REV2: PATCH 2/2]: workqueue: Modify some users to use the new API
Date: Mon, 29 Sep 2008 12:33:28 +0530 [thread overview]
Message-ID: <20080929070328.7386.70911.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080929070302.7386.72726.sendpatchset@localhost.localdomain>
From: Krishna Kumar <krkumar2@in.ibm.com>
Modify some users to use the new API.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
drivers/net/wireless/ipw2100.c | 12 ++++++------
drivers/net/wireless/libertas/scan.c | 5 ++---
drivers/net/wireless/libertas/wext.c | 7 +++----
fs/afs/vlocation.c | 11 +++--------
fs/ocfs2/cluster/heartbeat.c | 5 ++---
5 files changed, 16 insertions(+), 24 deletions(-)
diff -ruNp 2.6.27-rc7-org/drivers/net/wireless/ipw2100.c 2.6.27-rc7-new/drivers/net/wireless/ipw2100.c
--- 2.6.27-rc7-org/drivers/net/wireless/ipw2100.c 2008-09-22 03:59:55.000000000 +0530
+++ 2.6.27-rc7-new/drivers/net/wireless/ipw2100.c 2008-09-29 12:06:55.000000000 +0530
@@ -2085,9 +2085,8 @@ static void isr_indicate_rf_kill(struct
/* Make sure the RF Kill check timer is running */
priv->stop_rf_kill = 0;
- cancel_delayed_work(&priv->rf_kill);
- queue_delayed_work(priv->workqueue, &priv->rf_kill,
- round_jiffies_relative(HZ));
+ queue_update_delayed_work(priv->workqueue, &priv->rf_kill,
+ round_jiffies_relative(HZ));
}
static void send_scan_event(void *data)
@@ -4241,9 +4240,10 @@ static int ipw_radio_kill_sw(struct ipw2
"disabled by HW switch\n");
/* Make sure the RF_KILL check timer is running */
priv->stop_rf_kill = 0;
- cancel_delayed_work(&priv->rf_kill);
- queue_delayed_work(priv->workqueue, &priv->rf_kill,
- round_jiffies_relative(HZ));
+
+ queue_update_delayed_work(priv->workqueue,
+ &priv->rf_kill,
+ round_jiffies_relative(HZ));
} else
schedule_reset(priv);
}
diff -ruNp 2.6.27-rc7-org/drivers/net/wireless/libertas/scan.c 2.6.27-rc7-new/drivers/net/wireless/libertas/scan.c
--- 2.6.27-rc7-org/drivers/net/wireless/libertas/scan.c 2008-09-22 03:59:55.000000000 +0530
+++ 2.6.27-rc7-new/drivers/net/wireless/libertas/scan.c 2008-09-29 12:06:55.000000000 +0530
@@ -435,9 +435,8 @@ int lbs_scan_networks(struct lbs_private
priv->scan_channel = to_scan;
else
priv->scan_channel += to_scan;
- cancel_delayed_work(&priv->scan_work);
- queue_delayed_work(priv->work_thread, &priv->scan_work,
- msecs_to_jiffies(300));
+ queue_update_delayed_work(priv->work_thread,
+ &priv->scan_work, msecs_to_jiffies(300));
/* skip over GIWSCAN event */
goto out;
}
diff -ruNp 2.6.27-rc7-org/drivers/net/wireless/libertas/wext.c 2.6.27-rc7-new/drivers/net/wireless/libertas/wext.c
--- 2.6.27-rc7-org/drivers/net/wireless/libertas/wext.c 2008-09-22 03:59:55.000000000 +0530
+++ 2.6.27-rc7-new/drivers/net/wireless/libertas/wext.c 2008-09-29 12:06:55.000000000 +0530
@@ -24,10 +24,9 @@
static inline void lbs_postpone_association_work(struct lbs_private *priv)
{
- if (priv->surpriseremoved)
- return;
- cancel_delayed_work(&priv->assoc_work);
- queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2);
+ if (!priv->surpriseremoved)
+ queue_update_delayed_work(priv->work_thread, &priv->assoc_work,
+ HZ / 2);
}
static inline void lbs_cancel_association_work(struct lbs_private *priv)
diff -ruNp 2.6.27-rc7-org/fs/afs/vlocation.c 2.6.27-rc7-new/fs/afs/vlocation.c
--- 2.6.27-rc7-org/fs/afs/vlocation.c 2008-09-22 03:59:55.000000000 +0530
+++ 2.6.27-rc7-new/fs/afs/vlocation.c 2008-09-29 12:06:55.000000000 +0530
@@ -557,12 +557,8 @@ static void afs_vlocation_reaper(struct
if (expiry > now) {
delay = (expiry - now) * HZ;
_debug("delay %lu", delay);
- if (!schedule_delayed_work(&afs_vlocation_reap,
- delay)) {
- cancel_delayed_work(&afs_vlocation_reap);
- schedule_delayed_work(&afs_vlocation_reap,
- delay);
- }
+ schedule_update_delayed_work(&afs_vlocation_reap,
+ delay);
break;
}
@@ -615,8 +611,7 @@ void afs_vlocation_purge(void)
&afs_vlocation_update, 0);
destroy_workqueue(afs_vlocation_update_worker);
- cancel_delayed_work(&afs_vlocation_reap);
- schedule_delayed_work(&afs_vlocation_reap, 0);
+ schedule_update_delayed_work(&afs_vlocation_reap, 0);
}
/*
diff -ruNp 2.6.27-rc7-org/fs/ocfs2/cluster/heartbeat.c 2.6.27-rc7-new/fs/ocfs2/cluster/heartbeat.c
--- 2.6.27-rc7-org/fs/ocfs2/cluster/heartbeat.c 2008-09-22 03:59:55.000000000 +0530
+++ 2.6.27-rc7-new/fs/ocfs2/cluster/heartbeat.c 2008-09-29 12:06:55.000000000 +0530
@@ -172,10 +172,9 @@ static void o2hb_arm_write_timeout(struc
{
mlog(0, "Queue write timeout for %u ms\n", O2HB_MAX_WRITE_TIMEOUT_MS);
- cancel_delayed_work(®->hr_write_timeout_work);
reg->hr_last_timeout_start = jiffies;
- schedule_delayed_work(®->hr_write_timeout_work,
- msecs_to_jiffies(O2HB_MAX_WRITE_TIMEOUT_MS));
+ schedule_update_delayed_work(®->hr_write_timeout_work,
+ msecs_to_jiffies(O2HB_MAX_WRITE_TIMEOUT_MS));
}
static void o2hb_disarm_write_timeout(struct o2hb_region *reg)
next prev parent reply other threads:[~2008-09-29 7:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 7:03 [REV2: PATCH 0/2] workqueue: Two API's to update delayed works quickly Krishna Kumar
2008-09-29 7:03 ` [REV2: PATCH 1/2]: workqueue: Implement the kernel API Krishna Kumar
2008-09-29 14:27 ` Oleg Nesterov
2008-09-30 11:08 ` Krishna Kumar2
2008-09-30 13:15 ` Oleg Nesterov
2008-09-29 7:03 ` Krishna Kumar [this message]
2008-09-29 14:45 ` [REV2: PATCH 2/2]: workqueue: Modify some users to use the new API Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080929070328.7386.70911.sendpatchset@localhost.localdomain \
--to=krkumar2@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.