]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
aoe: don't use flush_scheduled_work()
authorTejun Heo <tj@kernel.org>
Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)
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@kernel.org>
Cc: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/aoe/aoedev.c

index 0849280bfc1c11adb175e4034126b269f52b3492..6b5110a474582fb296e7abbb0076c99a466d7fc8 100644 (file)
@@ -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, size_t cnt)
                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;