Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp142979rwb; Wed, 9 Nov 2022 21:40:30 -0800 (PST) X-Google-Smtp-Source: AMsMyM4VuvkqAercN4nJ3IsAxk+pTpPk5VtB/AitkmaHd4jIx6A/wuB+5xfRzfLIV0MR7g7o8RZs X-Received: by 2002:a17:906:ee89:b0:73d:70c5:1a4e with SMTP id wt9-20020a170906ee8900b0073d70c51a4emr56792941ejb.683.1668058829849; Wed, 09 Nov 2022 21:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668058829; cv=none; d=google.com; s=arc-20160816; b=shHKAlbvy/n18L+UKpIUI5rWL7dHY+Js0tScrDl72YPEcsxao69QeI8PXMgXpeuOQM V0D/JNzMSxoOznet4t7m53fK8WzCN2QYHQOzMnNIgIKNdzvZf7TsniCenVfVXVAZNubQ 6Y2inCBLvhptTuaOugh4rsPLhfzWJq9UffqiYXfMBxFx/8CtDgG9AgLyAVExOJkD7TOh 5XHDAhogyUrXUXFxgPd3j8iXxEypu36jcZqWEMDfLsbbDSSD1yuBbuFl8ciuKPNnrdfU 6IdF9zfdv0nLUMrv8RLr4TM10VXBHdtb31w90GopJC3/cM1EixkTMUIaDPiiEMGv0D5m Xbhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:from; bh=59cdqxMXa2aUcwvp2Q9FGCHTQZ/9R+4KKABcwzZW9s4=; b=yjlaPprqUOCcmStlgOUG6f9Yi1OEqdyNhuLaWav5WaJyu8nc42iQegVY8/T3A/S+dx JZHm1An+rKPxVsNu07FoZPgEykZZGsoLJMRZjDUE5ayWX5VFAOoa0CvF1xy8dIUhWq4v 0ZFagpCsQjMSrO8HPt5Qkt/gu6h+0p+AoOvtHS4W1mJ37mK4KLXiPSeQqqraSCmvrMjE BijwYMcmQyJ22E++l/V4+vIMotfaviyVusn9GUjMGwDXn71i98I9YO5jpkzdKxE82Jud xJ44wqAZO6HGZg3tR73QiOk6AUS37XU9i4rM7oZmHKSp3bIozlmlGGsMAIf+EBwGR2Vb hzgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=EeFpj9ul; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be17-20020a0564021a3100b0045c0de4b0e9si14652969edb.170.2022.11.09.21.40.07; Wed, 09 Nov 2022 21:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=EeFpj9ul; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232220AbiKJFY6 (ORCPT + 93 others); Thu, 10 Nov 2022 00:24:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiKJFY5 (ORCPT ); Thu, 10 Nov 2022 00:24:57 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE06275FC; Wed, 9 Nov 2022 21:24:55 -0800 (PST) From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1668057892; bh=SIhRYzH//kwaIhdzxST5+Pe24phe7wR7IiS7fLDVIpw=; h=From:To:Cc:Subject:Date:From; b=EeFpj9ulPKz3ANUzNLdzFGp0I0wnfEyPM0MMNAaFFz/+nWhods7DWc9sKzj8tPZCI 2+j4VswE9Abb621YrWji9yDudR+qwgbNRDdM/ZL2k8Hg+cdrUZnz15yODHCmkbtHQs AH3ueKjuGAVWaMaexKLAnNhPeprXY9QeN9yWLz4I= To: Josef Bacik , Jens Axboe , linux-block@vger.kernel.org, nbd@other.debian.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org Subject: [PATCH] nbd: automatically load module on genl access Date: Thu, 10 Nov 2022 06:24:38 +0100 Message-Id: <20221110052438.2188-1-linux@weissschuh.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1668057875; l=727; i=linux@weissschuh.net; s=20211113; h=from:subject; bh=SIhRYzH//kwaIhdzxST5+Pe24phe7wR7IiS7fLDVIpw=; b=TamtngLw5uGYaOiLQpg88P6iUzWfM1ZrfLyQNTSb9ffqCXcn6aghwLYi7eM0GXA0YO6yiR2sr1Hs UqDN2rPwBKx/saBBKi9xXSwr5k8/LNpPVAGDlsq5M6JV4imnTuxh X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=9LP6KM4vD/8CwHW7nouRBhWLyQLcK1MkP6aTZbzUlj4= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of forcing the user to manually load the module do it automatically. Signed-off-by: Thomas Weißschuh --- drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 5cffd96ef2d7..1c38a7ea9531 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -2328,6 +2328,7 @@ static struct genl_family nbd_genl_family __ro_after_init = { .mcgrps = nbd_mcast_grps, .n_mcgrps = ARRAY_SIZE(nbd_mcast_grps), }; +MODULE_ALIAS_GENL_FAMILY(NBD_GENL_FAMILY_NAME); static int populate_nbd_status(struct nbd_device *nbd, struct sk_buff *reply) { base-commit: f67dd6ce0723ad013395f20a3f79d8a437d3f455 -- 2.38.1