diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-04-19 03:46:39 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 12:07:20 -0400 |
commit | 40012f96b6765e588d8ffd7508d492339f2b9212 (patch) | |
tree | 36f18c7debed05ce37132c9c9105a66ef27d250b /fs/btrfs/inode.c | |
parent | 8ae225a8a4f9054ffc6566e14aaf05dfc559743e (diff) |
btrfs: Remove btrfs_wait_and_free_delalloc_work
This function is called from only 1 place and is effectively a wrapper
over wait_completion/kfree. It doesn't really bring any value having
those two calls in a separate function. Just open code it and remove it.
No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 775249f03dd3..ce2f9288df3e 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, | |||
10186 | return work; | 10186 | return work; |
10187 | } | 10187 | } |
10188 | 10188 | ||
10189 | void btrfs_wait_and_free_delalloc_work(struct btrfs_delalloc_work *work) | ||
10190 | { | ||
10191 | wait_for_completion(&work->completion); | ||
10192 | kfree(work); | ||
10193 | } | ||
10194 | |||
10195 | /* | 10189 | /* |
10196 | * some fairly slow code that needs optimization. This walks the list | 10190 | * some fairly slow code that needs optimization. This walks the list |
10197 | * of all the inodes with pending delalloc and forces them to disk. | 10191 | * 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, | |||
10248 | out: | 10242 | out: |
10249 | list_for_each_entry_safe(work, next, &works, list) { | 10243 | list_for_each_entry_safe(work, next, &works, list) { |
10250 | list_del_init(&work->list); | 10244 | list_del_init(&work->list); |
10251 | btrfs_wait_and_free_delalloc_work(work); | 10245 | wait_for_completion(&work->completion); |
10246 | kfree(work); | ||
10252 | } | 10247 | } |
10253 | 10248 | ||
10254 | if (!list_empty(&splice)) { | 10249 | if (!list_empty(&splice)) { |