[PATCH v2.6.36-rc7] aoe: don't use flush_scheduled_work()

From: Tejun Heo
Date: Fri Oct 15 2010 - 07:36:44 EST


flush_scheduled_work() is deprecated and scheduled to be removed.
Directly cancel aoedev->work on free instead of depending on
flush_scheduled_works().

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
---
drivers/block/aoe/aoedev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: work/drivers/block/aoe/aoedev.c
===================================================================
--- work.orig/drivers/block/aoe/aoedev.c
+++ work/drivers/block/aoe/aoedev.c
@@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d)
{
struct aoetgt **t, **e;

+ cancel_work_sync(&d->work);
if (d->gd) {
aoedisk_rm_sysfs(d);
del_gendisk(d->gd);
@@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, siz
all = !strncmp(buf, "all", 3);
}

- flush_scheduled_work();
spin_lock_irqsave(&devlist_lock, flags);
dd = &devlist;
while ((d = *dd)) {
@@ -257,8 +257,6 @@ aoedev_exit(void)
struct aoedev *d;
ulong flags;

- flush_scheduled_work();
-
while ((d = devlist)) {
devlist = d->next;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/