diff mbox

btrfs: simplify code with bio_io_error

Message ID 20170602080850.5410-1-gqjiang@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Guoqing Jiang June 2, 2017, 8:08 a.m. UTC
bio_io_error was introduced in the commit 4246a0b
("block: add a bi_error field to struct bio"), so
use it to simplify code.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
 fs/btrfs/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

David Sterba June 5, 2017, 3:36 p.m. UTC | #1
On Fri, Jun 02, 2017 at 04:08:50PM +0800, Guoqing Jiang wrote:
> bio_io_error was introduced in the commit 4246a0b
> ("block: add a bi_error field to struct bio"), so
> use it to simplify code.
> 
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 17cbe93..57335f5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8649,8 +8649,7 @@  static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,
 	 * callbacks - they require an allocated dip and a clone of dio_bio.
 	 */
 	if (io_bio && dip) {
-		io_bio->bi_error = -EIO;
-		bio_endio(io_bio);
+		bio_io_error(io_bio);
 		/*
 		 * The end io callbacks free our dip, do the final put on io_bio
 		 * and all the cleanup and final put for dio_bio (through