From patchwork Sat Oct 29 08:08:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 36CE9601C0 for ; Sat, 29 Oct 2016 08:33:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 252F12A6BD for ; Sat, 29 Oct 2016 08:33:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 185742A6CD; Sat, 29 Oct 2016 08:33:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA4DC2A6BD for ; Sat, 29 Oct 2016 08:33:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756499AbcJ2IMY (ORCPT ); Sat, 29 Oct 2016 04:12:24 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35379 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756324AbcJ2IMR (ORCPT ); Sat, 29 Oct 2016 04:12:17 -0400 Received: by mail-pf0-f194.google.com with SMTP id s8so3376393pfj.2; Sat, 29 Oct 2016 01:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j49YhcXtUyy6+zDdVaR5jkRCC99l1wRmwAyj9gXjAr8=; b=WJOkotoHkzzVnRoU0jlLawwMDP747sFPQ5BS7g7ANmlAFR0eo9sTkOipXZyGKF/Y38 79RxHlMFdmymLUd506iw5/D3EjYjgON8sHrPY9W1hh/u3hg42iphEZcKf10cMIoS3Xel Q3CQSBfWnGRG86wMin/9kClXzHVFeBcLPV0gVzOLyI+F8xJ4oE7Os2kh9e8f9QclDI0R BC8FEJIctTlFj3Kwl8G4eRlm0EgJsUC89Y1E2/iPp/1eBBT1NByPZy6HtPBt8DzGvsF6 W8jMTmyIsSz3Ig62FpEg7ZjX2qDyAhlkBMQZ4wA7jBM1umU52vu+Xjd/WpIKpwk4kFUK krLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j49YhcXtUyy6+zDdVaR5jkRCC99l1wRmwAyj9gXjAr8=; b=TXz8npn5Fai1yGwCM/y7AzmO5SZvU8t+ZmKTu3DcTtPX4Hqzu2RaHzbjwS7PxCxh00 0BO96Uu1kFksJXjT4iMY52rqlqPwYaxUg01flisg1yDlwOQv3IcWJZXhhq013rdKbsdA k93sO39nZjbyUQG/E5OC7YIxDgwb3drXTbCclc77J8FeX90wFvv/ljyN4egNYMvigQNs DnqbnpQcSqEUp7Lomt8hqrN1aeMau+HiYPFqp8YHdhRgrDwgtXUy6mxjYhZvySTO+f1h 1SFDtMuv+XqEeAb/zzSeUuVvYC0KXYEfkULpeDPsh6h22dGXwr1B8+PWqwkIKxjCYIu0 rG7Q== X-Gm-Message-State: ABUngvdIV6nD8TcONwRsbF6E9vA4aW+EteZRySo7WK6YTQ3X2Tdk/ocFXUZOpm/Fh+vZTg== X-Received: by 10.99.115.14 with SMTP id o14mr26468034pgc.44.1477728736647; Sat, 29 Oct 2016 01:12:16 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id y2sm18235308pff.82.2016.10.29.01.12.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:12:16 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Jiri Kosina , Mike Christie , Hannes Reinecke , Dan Williams Subject: [PATCH 04/60] block: floppy: use bio_add_page() Date: Sat, 29 Oct 2016 16:08:03 +0800 Message-Id: <1477728600-12938-5-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/block/floppy.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index cdc916a95137..999099d9509d 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3807,11 +3807,6 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) cbdata.drive = drive; bio_init_with_vec_table(&bio, &bio_vec, 1); - bio_vec.bv_page = page; - bio_vec.bv_len = size; - bio_vec.bv_offset = 0; - bio.bi_vcnt = 1; - bio.bi_iter.bi_size = size; bio.bi_bdev = bdev; bio.bi_iter.bi_sector = 0; bio.bi_flags |= (1 << BIO_QUIET); @@ -3819,6 +3814,8 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) bio.bi_end_io = floppy_rb0_cb; bio_set_op_attrs(&bio, REQ_OP_READ, 0); + bio_add_page(&bio, page, size, 0); + submit_bio(&bio); process_fd_request();