From patchwork Sun May 20 22:25:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 10413667 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 EE746600F6 for ; Sun, 20 May 2018 22:27:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3466205A9 for ; Sun, 20 May 2018 22:27:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C75AC285C7; Sun, 20 May 2018 22:27:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 8407B205A9 for ; Sun, 20 May 2018 22:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbeETW0p (ORCPT ); Sun, 20 May 2018 18:26:45 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:45984 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752569AbeETW0g (ORCPT ); Sun, 20 May 2018 18:26:36 -0400 Received: by mail-qt0-f195.google.com with SMTP id j42-v6so16787544qtj.12; Sun, 20 May 2018 15:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TvAIwHcy5eV5r7vqGIwADuATbPf5mA/0JArzAih9kFI=; b=Ruq7iuyUB2QM/5U7PI4eC31RxM3tKp5IvywOJpIKxuYxcPs0kkSb5zhJ0AbntUvz0b MjB+4wc4s6Xf5QLa1BKI07sfdJo65AIG7vzsjiwIWmTmXcNKQKNm8g+fK7Rqowwf4rgO sdQMWWy9E5dbQ6yc1/xs6hAyQbWxf/prlOty+031ULkcdF9PX/QFohOFEnjmQzbW0I6C JfKaeLIFTtssu0807goYwdRYUuEZZLJxv5Td/BH08Bf182p5I82673F356Eg5vUdXMdK /CFU5fdmjLIvAhhMg3veS/t0gmPpGaY8tEdHl90qtiv7nuht49szAwyYUwruF7gzhQrI 3nag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TvAIwHcy5eV5r7vqGIwADuATbPf5mA/0JArzAih9kFI=; b=UFJI2J2PGLVQ29QQOoFAzZFhqc2PyK9xXLSy/7R0jsItoglfqel9HBkURQ+rAavucU lYbQM61S4YHNYdimw2aC25rUE9Sr6UJA2vj0ZVbBlViIqZMoVv9cNdA0HKCuLmwCP0zv K8N6wUHWnDWHxFSeUnzN0MR0i4wjo35/H3zPW+TfJgNoCxqMu9kMaHHv1BCvM01PsoYZ bhkTPLbBJuAKNnHGV700aAqrSC4MD1xrINS+D1Ng5zOXF+mJwFJcXlLz76dMWUtFVdf7 kLwFIGmW2JMnSA7b5LpbJN3VydV5jNkmwKR00G015dJUVIvGotN75GtNYIVkrM3/nw9C hzgQ== X-Gm-Message-State: ALKqPweB2I0bc/7kay5CRhZrPlWmCnamu8Q2kFt7ua77IE3B7rbYqQyc zwLEDckcavz+8L7+zteUNJEt04jV4w== X-Google-Smtp-Source: AB8JxZoCaxHpVODJdLlQ73+PmO36NkvSmjeEln9bz/Hdk9OsNyetUS085mi6UjTOuf/0sye5B4yGjg== X-Received: by 2002:ac8:18c8:: with SMTP id o8-v6mr15691925qtk.400.1526855194271; Sun, 20 May 2018 15:26:34 -0700 (PDT) Received: from localhost.localdomain (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id v14-v6sm8773169qto.72.2018.05.20.15.26.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 15:26:33 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, axboe@kernel.dk, hch@infradead.org, colyli@suse.de, snitzer@redhat.com, darrick.wong@oracle.com, clm@fb.com, bacik@fb.com, linux-xfs@vger.kernel.org, drbd-dev@lists.linbit.com, linux-btrfs@vger.kernel.org, linux-raid@vger.kernel.org, neilb@suse.com Cc: Kent Overstreet Subject: [PATCH 09/12] fs: convert block_dev.c to bioset_init() Date: Sun, 20 May 2018 18:25:55 -0400 Message-Id: <20180520222558.7053-10-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180520222558.7053-1-kent.overstreet@gmail.com> References: <20180520222558.7053-1-kent.overstreet@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: Kent Overstreet Reviewed-by: Christoph Hellwig --- fs/block_dev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7ec920e270..b550ae280f 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -272,7 +272,7 @@ struct blkdev_dio { struct bio bio; }; -static struct bio_set *blkdev_dio_pool __read_mostly; +static struct bio_set blkdev_dio_pool; static void blkdev_bio_end_io(struct bio *bio) { @@ -334,7 +334,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) (bdev_logical_block_size(bdev) - 1)) return -EINVAL; - bio = bio_alloc_bioset(GFP_KERNEL, nr_pages, blkdev_dio_pool); + bio = bio_alloc_bioset(GFP_KERNEL, nr_pages, &blkdev_dio_pool); bio_get(bio); /* extra ref for the completion handler */ dio = container_of(bio, struct blkdev_dio, bio); @@ -432,10 +432,7 @@ blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter) static __init int blkdev_init(void) { - blkdev_dio_pool = bioset_create(4, offsetof(struct blkdev_dio, bio), BIOSET_NEED_BVECS); - if (!blkdev_dio_pool) - return -ENOMEM; - return 0; + return bioset_init(&blkdev_dio_pool, 4, offsetof(struct blkdev_dio, bio), BIOSET_NEED_BVECS); } module_init(blkdev_init);