Skip to content

Commit

Permalink
dm bufio: fix error code in dm_bufio_write_dirty_buffers()
Browse files Browse the repository at this point in the history
We should be returning normal negative error codes here.  The "a"
variables comes from &c->async_write_error which is a blk_status_t
converted to a regular error code.

In the current code, the blk_status_t gets propogated back to
pool_create() and eventually results in an Oops.

Fixes: 4e4cbee ("block: switch bios to blk_status_t")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mike Snitzer committed Jul 25, 2017
1 parent bc86a41 commit edc11d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-bufio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,7 @@ EXPORT_SYMBOL_GPL(dm_bufio_write_dirty_buffers_async);
*/
int dm_bufio_write_dirty_buffers(struct dm_bufio_client *c)
{
blk_status_t a;
int f;
int a, f;
unsigned long buffers_processed = 0;
struct dm_buffer *b, *tmp;

Expand Down

0 comments on commit edc11d4

Please sign in to comment.