The return value from submit_uncompressed_range is ignored, and that's
fine because the error reporting happens through the mapping and
ordered_extent.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
async_extent->pages = NULL;
}
async_extent->pages = NULL;
}
-static int submit_uncompressed_range(struct btrfs_inode *inode,
- struct async_extent *async_extent,
- struct page *locked_page)
+static void submit_uncompressed_range(struct btrfs_inode *inode,
+ struct async_extent *async_extent,
+ struct page *locked_page)
{
u64 start = async_extent->start;
u64 end = async_extent->start + async_extent->ram_size - 1;
{
u64 start = async_extent->start;
u64 end = async_extent->start + async_extent->ram_size - 1;
&nr_written, NULL, true, false);
/* Inline extent inserted, page gets unlocked and everything is done */
if (page_started)
&nr_written, NULL, true, false);
/* Inline extent inserted, page gets unlocked and everything is done */
if (page_started)
if (ret < 0) {
btrfs_cleanup_ordered_extents(inode, locked_page, start, end - start + 1);
if (ret < 0) {
btrfs_cleanup_ordered_extents(inode, locked_page, start, end - start + 1);
mapping_set_error(locked_page->mapping, ret);
unlock_page(locked_page);
}
mapping_set_error(locked_page->mapping, ret);
unlock_page(locked_page);
}
}
/* All pages will be unlocked, including @locked_page */
wbc_attach_fdatawrite_inode(&wbc, &inode->vfs_inode);
}
/* All pages will be unlocked, including @locked_page */
wbc_attach_fdatawrite_inode(&wbc, &inode->vfs_inode);
- ret = extent_write_locked_range(&inode->vfs_inode, start, end, &wbc);
+ extent_write_locked_range(&inode->vfs_inode, start, end, &wbc);
}
static void submit_one_async_extent(struct async_chunk *async_chunk,
}
static void submit_one_async_extent(struct async_chunk *async_chunk,
/* We have fall back to uncompressed write */
if (!async_extent->pages) {
/* We have fall back to uncompressed write */
if (!async_extent->pages) {
- ret = submit_uncompressed_range(inode, async_extent, locked_page);
+ submit_uncompressed_range(inode, async_extent, locked_page);