diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3a382ed940306d7afcaa2d09addc9ac41cb4d59c..de86f2217816f21d145836b8fbc75e26794106fa 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3173,7 +3173,6 @@ struct btrfs_delalloc_work { struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, int delay_iput); -void btrfs_wait_and_free_delalloc_work(struct btrfs_delalloc_work *work); struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode, struct page *page, size_t pg_offset, u64 start, diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 775249f03dd321616df3a19a2089e66d68c3d808..ce2f9288df3ecb65ddcfa0c3314828c22ac1de84 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -10186,12 +10186,6 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, return work; } -void btrfs_wait_and_free_delalloc_work(struct btrfs_delalloc_work *work) -{ - wait_for_completion(&work->completion); - kfree(work); -} - /* * some fairly slow code that needs optimization. This walks the list * of all the inodes with pending delalloc and forces them to disk. @@ -10248,7 +10242,8 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, out: list_for_each_entry_safe(work, next, &works, list) { list_del_init(&work->list); - btrfs_wait_and_free_delalloc_work(work); + wait_for_completion(&work->completion); + kfree(work); } if (!list_empty(&splice)) {