From 2dbe0c77186c691386b74391039899808a4d3f59 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Sat, 14 Oct 2017 08:35:56 +0800 Subject: [PATCH] btrfs: use BLK_STS defines where needed At few places we could use BLK_STS_OK and BLK_STS_NOSUPP. Signed-off-by: Anand Jain Reviewed-by: Satoru Taekeuchi Reviewed-by: David Sterba [ dropped first hunk btrfs_endio_direct_read ] Signed-off-by: David Sterba --- fs/btrfs/compression.c | 3 ++- fs/btrfs/inode.c | 2 +- fs/btrfs/volumes.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 280384b..8bdd3dc 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -255,7 +255,8 @@ static void end_compressed_bio_write(struct bio *bio) cb->start, cb->start + cb->len - 1, NULL, - bio->bi_status ? 0 : 1); + bio->bi_status ? + BLK_STS_OK : BLK_STS_NOTSUPP); cb->compressed_pages[0]->mapping = NULL; end_compressed_writeback(inode, cb); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a11f87f..f2787ca 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8485,7 +8485,7 @@ static void btrfs_end_dio_bio(struct bio *bio) if (dip->errors) { bio_io_error(dip->orig_bio); } else { - dip->dio_bio->bi_status = 0; + dip->dio_bio->bi_status = BLK_STS_OK; bio_endio(dip->orig_bio); } out: diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 4931b2d..56ed01f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6029,7 +6029,7 @@ static void btrfs_end_bio(struct bio *bio) * this bio is actually up to date, we didn't * go over the max number of errors */ - bio->bi_status = 0; + bio->bi_status = BLK_STS_OK; } btrfs_end_bbio(bbio, bio); -- 2.7.4