Skip to contentSkip to conversation

cifs: cancel_delayed_work() + flush_scheduled_work() -> cancel_delayed_work_sync()

PATCH In review Tejun Heo 3 participants 4 messages Oct 19, 2010

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 cifs: cancel_delayed_work() + flush_scheduled_work() -> cancel_delayed_work_sync()

flush_scheduled_work() is going away.

---
 fs/cifs/cifs_dfs_ref.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/cifs/cifs_dfs_ref.c +1 -2
Index: work/fs/cifs/cifs_dfs_ref.c
===================================================================
@@ -44,8 +44,7 @@ static void cifs_dfs_expire_automounts(s
 void cifs_dfs_release_automount_timer(void)
 {
 	BUG_ON(!list_empty(&cifs_dfs_automount_list));
-	cancel_delayed_work(&cifs_dfs_automount_task);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&cifs_dfs_automount_task);
 }
 
 /**
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · On Tue, 19 Oct 2010 17:55:54 +0200 Tejun Heo <[email protected]> wrote:

flush_scheduled_work() is going away.

---
 fs/cifs/cifs_dfs_ref.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: work/fs/cifs/cifs_dfs_ref.c
===================================================================

fs/cifs/cifs_dfs_ref.c static void cifs_dfs_expire_automounts(s · line 50

Quoted 9 lines
fs/cifs/cifs_dfs_ref.c +1 -2
@@ -44,8 +44,7 @@ static void cifs_dfs_expire_automounts(s
 void cifs_dfs_release_automount_timer(void)
 {
 	BUG_ON(!list_empty(&cifs_dfs_automount_list));
-	cancel_delayed_work(&cifs_dfs_automount_task);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&cifs_dfs_automount_task);
 }
 
 /**

Looks like a better way to do this anyhow.

author
#2 lore raw

Hello,

Quoted 23 lines · Jeff Layton
Quoted 20 lines · On Tue, 19 Oct 2010 17:55:54 +0200 Tejun Heo…

flush_scheduled_work() is going away.

---
 fs/cifs/cifs_dfs_ref.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: work/fs/cifs/cifs_dfs_ref.c
===================================================================

fs/cifs/cifs_dfs_ref.c +1 -2
@@ -44,8 +44,7 @@ static void cifs_dfs_expire_automounts(s
 void cifs_dfs_release_automount_timer(void)
 {
 	BUG_ON(!list_empty(&cifs_dfs_automount_list));
-	cancel_delayed_work(&cifs_dfs_automount_task);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&cifs_dfs_automount_task);
 }
 
Quoted 5 lines

fs/cifs/cifs_dfs_ref.c static void cifs_dfs_expire_automounts(s · line 50

Quoted 1 line
fs/cifs/cifs_dfs_ref.c +0 -0
 /**

Looks like a better way to do this anyhow.

Yeah, way faster too. It would be best to route this patch through cifs tree but I can push it through wq tree too. Just let me know.

Thanks.

Signature · 1 line
tejun
#3 lore raw

OK - will add this to the cifs tree this afternoon.

Quoted 44 lines · Tejun Heo

Hello,

Quoted 23 lines · Jeff Layton
Quoted 20 lines · On Tue, 19 Oct 2010 17:55:54 +0200 Tejun Heo…

flush_scheduled_work() is going away.

---
 fs/cifs/cifs_dfs_ref.c |    3 +--

 1 file changed, 1 insertion(+), 2 deletions(-)

Index: work/fs/cifs/cifs_dfs_ref.c
===================================================================

fs/cifs/cifs_dfs_ref.c +1 -2
@@ -44,8 +44,7 @@ static void cifs_dfs_expire_automounts(s
  void cifs_dfs_release_automount_timer(void)
  {
      BUG_ON(!list_empty(&cifs_dfs_automount_list));
-    cancel_delayed_work(&cifs_dfs_automount_task);
-    flush_scheduled_work();
+    cancel_delayed_work_sync(&cifs_dfs_automount_task);
  }
 
Quoted 5 lines

fs/cifs/cifs_dfs_ref.c static void cifs_dfs_expire_automounts(s · line 50

Quoted 1 line
fs/cifs/cifs_dfs_ref.c +0 -0
  /**

Looks like a better way to do this anyhow.

Yeah, way faster too.  It would be best to route this patch through cifs tree but I can push it through wq tree too.  Just let me know.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Steve