Commit c44f649e authored by Filipe Manana's avatar Filipe Manana Committed by Chris Mason

Btrfs: make inode.c:compress_file_range() return void

Its return value is useless, its single caller ignores it and can't do
anything with it anyway, since it's a workqueue task and not the task
calling filemap_fdatawrite_range (writepages) nor filemap_fdatawait_range().
Failure is communicated to such functions via start and end of writeback
with the respective pages tagged with an error and AS_EIO flag set in the
inode's imapping.
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 4bcbb332
...@@ -382,7 +382,7 @@ static inline int inode_need_compress(struct inode *inode) ...@@ -382,7 +382,7 @@ static inline int inode_need_compress(struct inode *inode)
* are written in the same order that the flusher thread sent them * are written in the same order that the flusher thread sent them
* down. * down.
*/ */
static noinline int compress_file_range(struct inode *inode, static noinline void compress_file_range(struct inode *inode,
struct page *locked_page, struct page *locked_page,
u64 start, u64 end, u64 start, u64 end,
struct async_cow *async_cow, struct async_cow *async_cow,
...@@ -620,8 +620,7 @@ static noinline int compress_file_range(struct inode *inode, ...@@ -620,8 +620,7 @@ static noinline int compress_file_range(struct inode *inode,
*num_added += 1; *num_added += 1;
} }
out: return;
return ret;
free_pages_out: free_pages_out:
for (i = 0; i < nr_pages_ret; i++) { for (i = 0; i < nr_pages_ret; i++) {
...@@ -629,8 +628,6 @@ static noinline int compress_file_range(struct inode *inode, ...@@ -629,8 +628,6 @@ static noinline int compress_file_range(struct inode *inode,
page_cache_release(pages[i]); page_cache_release(pages[i]);
} }
kfree(pages); kfree(pages);
goto out;
} }
static void free_async_extent_pages(struct async_extent *async_extent) static void free_async_extent_pages(struct async_extent *async_extent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment