Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4017111pxk; Tue, 22 Sep 2020 08:22:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjJd4VViR01H8H1INNGYgCoBOAPMr8P/P/FEv3tZoN1de2W3vplHMfUeVrseBpgUGNQ5UB X-Received: by 2002:a05:6402:184d:: with SMTP id v13mr4594499edy.240.1600788122211; Tue, 22 Sep 2020 08:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600788122; cv=none; d=google.com; s=arc-20160816; b=GonT+wO+4rtV6vzJ+VvNgqU7f8cF2R9nK+Rc52Txp8NptnX7l9pUXb8tjc0Ybimq47 JWooxEqHMBFisbAA9cIRuCI63sCMkBLtOsWheZGKih6MqeGGdSBleygtES6bATHVDXnH S4AKHPbvKcNbfQuhx74cCmAwx2tL1l/KuSydOmkKcOMhFbVoJKkLorWrohlu8LrTPH8+ Hp75AeYEToYKWbPOKUDKpC+wz+Du7OU52oJGvMueBKnAxFAqO6Cbp/IYsSdzUXoK0DYx 64T4eSjcrlbXsf6WkT4bMi0mlXsBbh0EJeSUSS4V9mFuBmAqdFWdX7r4vtqAPayzqbTh DA0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=s7b0G9lisUfCrCNxaUFmc71Hbq6lYd3xM2O0ZMyJbVU=; b=vo/Ng52Qev8wKxhPu/pFrL9PC6vI+EPv0XjHVUo2kfuQbOuwHZ+IekoKqWHIq1d+9M SS/12ct/GRXevAvauMUCiHpbxHqxlO38pjKJEYDNMg9OVtK/P3TLMvboIGqdWdY007Tt z7Phuua/OydAtm7H228RR1Og/Q0A6+4WdMqQ3/iR2209QlsL/LimtlBZ97TO5R1NmMo/ yRxBI6Y3cPOJTf4sYWw3GEj7GNsXbkv2y51z12x5n24ean5jE2XAjYVxTeCT9ynAp5+M NOyvODfBOSZUsrl1O2PRAWJRwSC9vsQaFWgMq4LfHGwUM1oobbvD4grEnfH4pqQIrKas 4szA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=fNQUiQQj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si10333652edt.194.2020.09.22.08.21.35; Tue, 22 Sep 2020 08:22:02 -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=@ibm.com header.s=pp1 header.b=fNQUiQQj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgIVPUc (ORCPT + 99 others); Tue, 22 Sep 2020 11:20:32 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:7725 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgIVPUb (ORCPT ); Tue, 22 Sep 2020 11:20:31 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08MFI9C6002529; Tue, 22 Sep 2020 11:19:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=s7b0G9lisUfCrCNxaUFmc71Hbq6lYd3xM2O0ZMyJbVU=; b=fNQUiQQjJ0O5RSJT3y1fx+etwvA15nMBC5V5JgxKwHs06zE3C6vupZyyi+OuN6tL45bI 1pHqyK4HANqAFdynEtxHFiGAQA4HZkIUq2lq32AKF55q9+hBYrTvnP43Kh8xkLl+ticB iQty6dX6it0Qgwj3rxk8xee7nDY7h79H/j5eXPu4LbmuNqKQFc03OncT9GbrTOUWW5Y8 pvnlW1qj1A8XEr8bnrvC4vSK+oXRFDkzVfoYmps/YsGYh7XzaJDyln87jDOJK5BEqVuw +f9GiyqWVmzWQQxAR0jZPUme45PCu5WpV9Wko+qwYDmGCbkxRpudRNsyw6jonoFNtsLU 7w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33qjj1a9n9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Sep 2020 11:19:13 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08MFIPF6003571; Tue, 22 Sep 2020 11:19:07 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 33qjj1a9kr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Sep 2020 11:19:07 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08MFCBYk017630; Tue, 22 Sep 2020 15:19:03 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma02fra.de.ibm.com with ESMTP id 33n9m81nnf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Sep 2020 15:19:03 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08MFIweT23265540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Sep 2020 15:18:58 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3BA144203F; Tue, 22 Sep 2020 15:19:00 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 81EB64204B; Tue, 22 Sep 2020 15:18:59 +0000 (GMT) Received: from linux.fritz.box (unknown [9.145.169.80]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 22 Sep 2020 15:18:59 +0000 (GMT) Subject: Re: [PATCH 08/14] dasd: cleanup dasd_scan_partitions To: Christoph Hellwig , Jens Axboe Cc: Josef Bacik , Minchan Kim , Jan Hoeppner , Joseph Qi , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Andrew Morton , linux-kernel@vger.kernel.org, nbd@other.debian.org, linux-ide@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-pm@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org References: <20200921071958.307589-1-hch@lst.de> <20200921071958.307589-9-hch@lst.de> From: Stefan Haberland Autocrypt: addr=sth@linux.ibm.com; keydata= mQINBFtGVggBEADI1Lne1npTa+b5x5EJ7ka0siRMargCCo5dcOaCBBG3wT24IyyG6chdV7Yr vkeHDm/6OjMi+w8Vbx2ts0KhYWMj9SHX2E58AsyBedeCkedOKuhkNh0HNSv8WMCEi24uoYK9 3VW0bQ3KYAB5wYQ/bONn05qSJ18Ev2Mqs1IOJdukJAM6dcJoUX2NigSiumGBB1SgJLHjbAFB l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Q5oTiysACFM2vkOaOhj2Izh2L+dbuKJIT0Qus0hUJ uEjGgIAXn7hYNeM1MMqSA81NEoCeUhNHeZudf5WSoglG3rUnxIXrnxfDkn8Vd36cinGejyrI qJoydRMpX48I3wJcyvZ8+xgM/LLlvXEH4BpuJL+vQkefJrn0R2vxTnHcj5TE1tKNwhI7/343 PNzhgHGYynjCbF4u9qpSqcJl/exFnRXaTH6POIbHXIRe8n4TfdXsOcbI3j/GUF0cXinkfxdt BWH5rC3Ng+EN3jkDo8N9qF7uEqN9rRaekqsO0jYMQJlfZeJSQH9KHD+wgZly9j6DmnGexbdB aJdzCtbIR+oJy0HjfwvIQrgp1pj0yvXeDsUHykATsORx0ZitlGUuU6tlAnbH346nNSDoklLI lEDvODTgpkhWDczM69MGKrFYgDcIqXZFWzea6Xq+cuGtGO5xV/4K+efWQovlIdv4mE4j2E2G yXj14Nuyh4wqdX9/yspSZCH1TCbXD9WEB5nQCQNAKzIB7YaTQBjFi1HFzGOGYteZGC37DJ6a xEMRG8/iNZSU4dSL+XsaTnUk5wzzSnz0QVOEOqRY5tkS3zpo9OUGevyR3R6bRqH3EaA5H1cS cH4TNHyhiR0KAbxE8qKx3Jc= Message-ID: <88ca251c-c417-cd92-3d47-653dff346d7c@linux.ibm.com> Date: Tue, 22 Sep 2020 17:18:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200921071958.307589-9-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-22_13:2020-09-21,2020-09-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 adultscore=0 clxscore=1011 spamscore=0 mlxscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009220116 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 21.09.20 um 09:19 schrieb Christoph Hellwig: > Use blkdev_get_by_dev instead of bdget_disk + blkdev_get. > > Signed-off-by: Christoph Hellwig Beside what Sergei mentioned... Reviewed-by: Stefan Haberland > --- > drivers/s390/block/dasd_genhd.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c > index af5b0ecb8f8923..a9698fba9b76ce 100644 > --- a/drivers/s390/block/dasd_genhd.c > +++ b/drivers/s390/block/dasd_genhd.c > @@ -101,18 +101,11 @@ int dasd_scan_partitions(struct dasd_block *block) > struct block_device *bdev; > int rc; > > - bdev = bdget_disk(block->gdp, 0); > - if (!bdev) { > - DBF_DEV_EVENT(DBF_ERR, block->base, "%s", > - "scan partitions error, bdget returned NULL"); > - return -ENODEV; > - } > - > - rc = blkdev_get(bdev, FMODE_READ, NULL); > - if (rc < 0) { > + bdev = blkdev_get_by_dev(disk_devt(block->gdp), FMODE_READ, NULL); > + if (IS_ERR(bdev)) { > DBF_DEV_EVENT(DBF_ERR, block->base, > - "scan partitions error, blkdev_get returned %d", > - rc); > + "scan partitions error, blkdev_get returned %ld", > + PTR_ERR(bdev)); > return -ENODEV; > } >