Commit ff20d6a4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba

btrfs: remove the return value from submit_uncompressed_range

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: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 84f262f0
...@@ -1124,7 +1124,7 @@ static void free_async_extent_pages(struct async_extent *async_extent) ...@@ -1124,7 +1124,7 @@ static void free_async_extent_pages(struct async_extent *async_extent)
async_extent->pages = NULL; async_extent->pages = NULL;
} }
static int submit_uncompressed_range(struct btrfs_inode *inode, static void submit_uncompressed_range(struct btrfs_inode *inode,
struct async_extent *async_extent, struct async_extent *async_extent,
struct page *locked_page) struct page *locked_page)
{ {
...@@ -1151,7 +1151,7 @@ static int submit_uncompressed_range(struct btrfs_inode *inode, ...@@ -1151,7 +1151,7 @@ static int submit_uncompressed_range(struct btrfs_inode *inode,
&nr_written, NULL, true, false); &nr_written, NULL, true, false);
/* Inline extent inserted, page gets unlocked and everything is done */ /* Inline extent inserted, page gets unlocked and everything is done */
if (page_started) if (page_started)
return 0; return;
if (ret < 0) { if (ret < 0) {
btrfs_cleanup_ordered_extents(inode, locked_page, start, end - start + 1); btrfs_cleanup_ordered_extents(inode, locked_page, start, end - start + 1);
...@@ -1169,14 +1169,13 @@ static int submit_uncompressed_range(struct btrfs_inode *inode, ...@@ -1169,14 +1169,13 @@ static int submit_uncompressed_range(struct btrfs_inode *inode,
mapping_set_error(locked_page->mapping, ret); mapping_set_error(locked_page->mapping, ret);
unlock_page(locked_page); unlock_page(locked_page);
} }
return ret; return;
} }
/* All pages will be unlocked, including @locked_page */ /* All pages will be unlocked, including @locked_page */
wbc_attach_fdatawrite_inode(&wbc, &inode->vfs_inode); 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);
wbc_detach_inode(&wbc); wbc_detach_inode(&wbc);
return ret;
} }
static void submit_one_async_extent(struct async_chunk *async_chunk, static void submit_one_async_extent(struct async_chunk *async_chunk,
...@@ -1213,7 +1212,7 @@ static void submit_one_async_extent(struct async_chunk *async_chunk, ...@@ -1213,7 +1212,7 @@ static void submit_one_async_extent(struct async_chunk *async_chunk,
/* We have fall back to uncompressed write */ /* We have fall back to uncompressed write */
if (!async_extent->pages) { if (!async_extent->pages) {
ret = submit_uncompressed_range(inode, async_extent, locked_page); submit_uncompressed_range(inode, async_extent, locked_page);
goto done; goto done;
} }
......
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