diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a25684287501..f3c4ad2ddfe6 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -824,24 +824,14 @@ void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices, int step) mutex_unlock(&uuid_mutex); } -static void __free_device(struct work_struct *work) -{ - struct btrfs_device *device; - - device = container_of(work, struct btrfs_device, rcu_work); - rcu_string_free(device->name); - bio_put(device->flush_bio); - kfree(device); -} - static void free_device(struct rcu_head *head) { struct btrfs_device *device; device = container_of(head, struct btrfs_device, rcu); - - INIT_WORK(&device->rcu_work, __free_device); - schedule_work(&device->rcu_work); + rcu_string_free(device->name); + bio_put(device->flush_bio); + kfree(device); } static void btrfs_close_bdev(struct btrfs_device *device) diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index ff15208344a7..bf0d53a96b4a 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -133,7 +133,6 @@ struct btrfs_device { struct btrfs_work work; struct rcu_head rcu; - struct work_struct rcu_work; /* readahead state */ spinlock_t reada_lock;