From patchwork Sat Sep 4 01:39:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 507188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C73F0C433FE for ; Sat, 4 Sep 2021 01:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2DF160FA0 for ; Sat, 4 Sep 2021 01:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351029AbhIDBkn (ORCPT ); Fri, 3 Sep 2021 21:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351014AbhIDBkm (ORCPT ); Fri, 3 Sep 2021 21:40:42 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4B1C061575; Fri, 3 Sep 2021 18:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=TQ80OKAWeIbCJBkkv2wko3z0JghBDWZldcKGy2+/JtU=; b=YVIKUi+7CrVfLqKI9PLwSgdSev JNLbK12ZAtZ96F7k3Dst6M0nucVGxz9HnoUVmByGsxtH2TSA+xKUDTCEggs7lTG9sPfBfHJfDQ3kV iXt56Oc3YUrHM8lSudbyOpbNt/vMZYprGyVKrNsZVYt26lAh4JTZKTCUwXR9ezdoqiZPeZ+/tvGPP 1qkknba3VlFkhoUa7CYCiHKjq17V3BcfUVTiu9j4myKPJogUeyo1EzIzfdJJC4HoU4QBHArsyAAwy +bJozZrXbIhmagg6/rh4IkZRGyuSnp+HpYoEERg+Oi/aY5b2sHBj1OZl+DKv3KijxBv8EB91o2E66 /oHRwPVQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMKeb-00DLzr-2J; Sat, 04 Sep 2021 01:39:33 +0000 From: Luis Chamberlain To: axboe@kernel.dk, hch@lst.de, efremov@linux.com, song@kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, hare@suse.de, jack@suse.cz, ming.lei@redhat.com, tj@kernel.org Cc: linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 0/2] block: 7th -- last batch of add_disk() error handling conversions Date: Fri, 3 Sep 2021 18:39:30 -0700 Message-Id: <20210904013932.3182778-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This is the 7th and final set of changes to convert all drivers over to use and finally enforce add_disk() error handling. This set deals with those old drivers using __register_blkdev() which in turn have a respective add_disk() call made. The last patch ensures we won't add new drivers without a check for the add_disk() call. You can find the full set of patches on my kernel.org linux 20210901-for-axboe-add-disk-error-handling branch [0] which is now based on axboe/master. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210901-for-axboe-add-disk-error-handling Luis Chamberlain (2): block: make __register_blkdev() return an error block: add __must_check for *add_disk*() callers block/genhd.c | 21 ++++++++++++--------- drivers/block/ataflop.c | 20 +++++++++++++++----- drivers/block/brd.c | 7 +++++-- drivers/block/floppy.c | 14 ++++++++++---- drivers/block/loop.c | 6 +++--- drivers/md/md.c | 10 +++++++--- drivers/scsi/sd.c | 3 ++- fs/block_dev.c | 5 ++++- include/linux/genhd.h | 10 +++++----- 9 files changed, 63 insertions(+), 33 deletions(-)