Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp151754pxv; Thu, 8 Jul 2021 17:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYh1v3oQpzNdt16E2eUytEWXwhHos4CwgWNL2fVXJ75zFWjM/BSzgD0twBd4ihzRRJJjjm X-Received: by 2002:a92:d44b:: with SMTP id r11mr2060725ilm.217.1625790849230; Thu, 08 Jul 2021 17:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625790849; cv=none; d=google.com; s=arc-20160816; b=kLi+LxZm69rXVPw1gFOLu0bhKhF9osQE/PPAok4TLgrro7SUZopOtOCFQayg2YEJfU 9b6VbNJL9cXZaEtY5vnwGRO0Q1367dChEgwsZjeVonjDUdfR77UXS7oxiB84p1EMUx6t ZxGloLp4f0i2Umw4AncCLQkPiEeMVQxbSVgeIw2vW3m3K8LixjLm33P5UuN6lRtc9iV5 SNTOk2a/GNu4kIWKXW0SSN3pVMLdI0LWRTIbkQjhoEY+g458KD4e3xvb0GBJhzMUi0PI W0cOe84oe3c2iAzq3q7DEF5CmrNnr/JEmzkjwZIjVYxc5oyeAbfYIz/g/gxc5OFx0CL5 RHKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=cwHjJ2KTF2Ie6stC8kUsNbcfQWUHgNomwuUo15Da9kI=; b=ARp0Qy357PcbnwJXksU4nOzXXbsd4UrIWgcERj06suAiTB+1Vb+WmU6dIhMyz3MTEU d9/ch4xoxKeUWXZ4bfTrwsnKDXmB8mZ6/WVV7z15N7+1lExPKPsrDsgmJNIu+tIpFFkw mze+zzn7Sjdg9eGz88FSZrH+RaAjkEOgVBO1wZsLgu0v9ZNT+tFZ9tBLd5KpUefyy9mh XHiLluKnW7Zuy/9P2p7MmWvpaHBXqIYqqyM/NJhoQSVfxtyiuyxL8RRkx2TgjIC6sA3V ncAXBhLjAQyaVXTRWdyRTwbLOxHiliIrx7VUnZsZrN1Af+AOhOLgh1p1GYh1AQambAfg ADQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=CUpfBaH2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si3774866iob.87.2021.07.08.17.33.56; Thu, 08 Jul 2021 17:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=CUpfBaH2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbhGIAfd (ORCPT + 99 others); Thu, 8 Jul 2021 20:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbhGIAfd (ORCPT ); Thu, 8 Jul 2021 20:35:33 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C304EC061574; Thu, 8 Jul 2021 17:32:50 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4GLYz22zrRz9sWd; Fri, 9 Jul 2021 10:32:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1625790767; bh=+WN6vickkkMlDTyJCZqZwVOeIpzHZ/inZVOsfbJRzz8=; h=Date:From:To:Cc:Subject:From; b=CUpfBaH2wcyTM+9arf0YKFUPUXSP4LWKeHygArB7q5aol3yrwlJpnn13JaW6/STiW RK1QgKBdBtn/ewWKiOXbkYQQiBP9UdACPwuDxAct2vlV/OV+oyGfQGFdmxZcAcZgwh h4nkFO1CeAsFSGOZArC5epPZ/kdyPMXLvT1r6HXkNMpJCHA/pWzxfouypcM5dNFDCH 2bAJ33IRWw6VkT7uQcWKSYOrKt7mSoMpOrLnenGb3m6843mMLpEDl7dzxpj0xO4lGb Jmpx4VlBztWOplwqD/cOFxpWF+EllucfAEUWUwSOQCRN7dqjiXhdmT6s19/bREHHE6 1RP+ylNo1aNoA== Date: Fri, 9 Jul 2021 10:32:44 +1000 From: Stephen Rothwell To: Jens Axboe , Ulf Hansson Cc: Christoph Hellwig , Linux Kernel Mailing List , Linux Next Mailing List , Stephen Boyd Subject: linux-next: manual merge of the block tree with the mmc-fixes tree Message-ID: <20210709103244.64b2f1de@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/8JDPbODuzXKJlel5Nywvt_/"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/8JDPbODuzXKJlel5Nywvt_/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the block tree got a conflict in: drivers/mmc/core/block.c between commit: 5c0777665b3e ("mmc: core: Use kref in place of struct mmc_blk_data::usage= ") from the mmc-fixes tree and commits: 249cda3325e0 ("mmc: remove an extra blk_{get,put}_queue pair") 607d968a5769 ("mmc: switch to blk_mq_alloc_disk") from the block tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc drivers/mmc/core/block.c index d7b5c5ab75fa,9890a1532cb0..000000000000 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@@ -195,26 -196,18 +195,25 @@@ static inline int mmc_get_devidx(struc return devidx; } =20 -static void mmc_blk_put(struct mmc_blk_data *md) +static void mmc_blk_kref_release(struct kref *ref) { - mutex_lock(&open_lock); - md->usage--; - if (md->usage =3D=3D 0) { - int devidx =3D mmc_get_devidx(md->disk); + struct mmc_blk_data *md =3D container_of(ref, struct mmc_blk_data, kref); + int devidx; =20 - ida_simple_remove(&mmc_blk_ida, devidx); - put_disk(md->disk); - kfree(md); - } + devidx =3D mmc_get_devidx(md->disk); - blk_put_queue(md->queue.queue); + ida_simple_remove(&mmc_blk_ida, devidx); + + mutex_lock(&open_lock); + md->disk->private_data =3D NULL; mutex_unlock(&open_lock); + + put_disk(md->disk); + kfree(md); +} + +static void mmc_blk_put(struct mmc_blk_data *md) +{ + kref_put(&md->kref, mmc_blk_kref_release); } =20 static ssize_t power_ro_lock_show(struct device *dev, @@@ -2334,27 -2327,11 +2333,11 @@@ static struct mmc_blk_data *mmc_blk_all =20 INIT_LIST_HEAD(&md->part); INIT_LIST_HEAD(&md->rpmbs); - md->usage =3D 1; + kref_init(&md->kref); -=20 - ret =3D mmc_init_queue(&md->queue, card); - if (ret) - goto err_putdisk; -=20 md->queue.blkdata =3D md; =20 - /* - * Keep an extra reference to the queue so that we can shutdown the - * queue (i.e. call blk_cleanup_queue()) while there are still - * references to the 'md'. The corresponding blk_put_queue() is in - * mmc_blk_put(). - */ - if (!blk_get_queue(md->queue.queue)) { - mmc_cleanup_queue(&md->queue); - ret =3D -ENODEV; - goto err_putdisk; - } -=20 md->disk->major =3D MMC_BLOCK_MAJOR; + md->disk->minors =3D perdev_minors; md->disk->first_minor =3D devidx * perdev_minors; md->disk->fops =3D &mmc_bdops; md->disk->private_data =3D md; --Sig_/8JDPbODuzXKJlel5Nywvt_/ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmDnmSwACgkQAVBC80lX 0GxpEAf/TTd1pOJ2c3TF+OFt1CnJY43J47OxQh9rRSb7DEhZLTRuLrOSu6EWPRwV OMtFNkCLPFiPRcbGwm0WfFgrqnyoHY+bHf0lmLzLquU/goUjmn7pb8PXK8I04Oc8 BEFv9s2deScbYWxXcPxL38sPLI9nFCBu3/sxj8zxYekZ8i4w4vT+4VRhlk5pKN27 nUWK+TlF8KWOu/siqx+bY0527WhzqJF1ZFHeo6qQyN98SRIGeX6tOODGRxTxvj4v 8k8SFjYHDpg1yW5T69vrhfxXAD0B53p+uUtRo9NvxYVAJtrvQoVkylMxZMKFUazP Odru69agAYnSL1mw9v1Nzec0cXHhfQ== =/4k3 -----END PGP SIGNATURE----- --Sig_/8JDPbODuzXKJlel5Nywvt_/--