btrfs: use new block error code
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 19 Jun 2017 10:55:37 +0000 (13:55 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jun 2017 13:47:34 +0000 (07:47 -0600)
This function is supposed to return blk_status_t error codes now but
there was a stray -ENOMEM left behind.

Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/compression.c

index 9ac55b266e78d865bfbdb4cf8ee3c417162ec906..a2fad39f79ba0c7fd07cff25919a9112f5c04013 100644 (file)
@@ -638,7 +638,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
                                                              __GFP_HIGHMEM);
                if (!cb->compressed_pages[pg_index]) {
                        faili = pg_index - 1;
-                       ret = -ENOMEM;
+                       ret = BLK_STS_RESOURCE;
                        goto fail2;
                }
        }