mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
aoe: don't use flush_scheduled_work()
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>
This commit is contained in:
parent
2027ae1fa9
commit
5ad21a3374
1 changed files with 1 additions and 3 deletions
|
@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d)
|
||||||
{
|
{
|
||||||
struct aoetgt **t, **e;
|
struct aoetgt **t, **e;
|
||||||
|
|
||||||
|
cancel_work_sync(&d->work);
|
||||||
if (d->gd) {
|
if (d->gd) {
|
||||||
aoedisk_rm_sysfs(d);
|
aoedisk_rm_sysfs(d);
|
||||||
del_gendisk(d->gd);
|
del_gendisk(d->gd);
|
||||||
|
@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, size_t cnt)
|
||||||
all = !strncmp(buf, "all", 3);
|
all = !strncmp(buf, "all", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
flush_scheduled_work();
|
|
||||||
spin_lock_irqsave(&devlist_lock, flags);
|
spin_lock_irqsave(&devlist_lock, flags);
|
||||||
dd = &devlist;
|
dd = &devlist;
|
||||||
while ((d = *dd)) {
|
while ((d = *dd)) {
|
||||||
|
@ -257,8 +257,6 @@ aoedev_exit(void)
|
||||||
struct aoedev *d;
|
struct aoedev *d;
|
||||||
ulong flags;
|
ulong flags;
|
||||||
|
|
||||||
flush_scheduled_work();
|
|
||||||
|
|
||||||
while ((d = devlist)) {
|
while ((d = devlist)) {
|
||||||
devlist = d->next;
|
devlist = d->next;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue