OSDN Git Service

ocfs2: don't use flush_scheduled_work()
authorTejun Heo <tj@kernel.org>
Fri, 24 Dec 2010 14:59:06 +0000 (15:59 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 24 Dec 2010 14:59:06 +0000 (15:59 +0100)
flush_scheduled_work() is deprecated and scheduled to be removed.

* cancel_delayed_work() + flush_schedule_work() ->
  cancel_delayed_work_sync().

* flush qs->qs_work directly on exit instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Joel Becker <joel.becker@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/cluster/quorum.c

index 52c7557..892e2de 100644 (file)
@@ -307,8 +307,7 @@ static void o2hb_arm_write_timeout(struct o2hb_region *reg)
 
 static void o2hb_disarm_write_timeout(struct o2hb_region *reg)
 {
-       cancel_delayed_work(&reg->hr_write_timeout_work);
-       flush_scheduled_work();
+       cancel_delayed_work_sync(&reg->hr_write_timeout_work);
 }
 
 static inline void o2hb_bio_wait_init(struct o2hb_bio_wait_ctxt *wc)
index cf3e166..a873667 100644 (file)
@@ -325,5 +325,7 @@ void o2quo_init(void)
 
 void o2quo_exit(void)
 {
-       flush_scheduled_work();
+       struct o2quo_state *qs = &o2quo_state;
+
+       flush_work_sync(&qs->qs_work);
 }