Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp599977imp; Thu, 21 Feb 2019 07:33:38 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibt4o2RoYsaf30FBfDwTHdzUT4eczmoLvpYC57LjbgE73YoboTUDlFycrpZwDjgFOaZjLZX X-Received: by 2002:a63:1a25:: with SMTP id a37mr21217946pga.428.1550763218174; Thu, 21 Feb 2019 07:33:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550763218; cv=none; d=google.com; s=arc-20160816; b=GjFwWP+uGTSmuZ/8OvkFsOcYCKpAx4CCgrzh7lC0K9Q6KirezCJcyi9XsE9aCIPRi7 A32byeNznlCEQQ13Brmf0QwK5L82bDUEuw/o5kaQtDA1v4OuDnSITI0KtCv3QbK95AjX t8bPQmh7Ich844gtsFvYIvszJfNg7clwcnarzl0/gCBjartnGthBaQ18IV1KKHKdZHzJ tsWiAkS1m1Vz3sWULC4IpnwTQelLp4mXt0Lx8ivqvSzuqgPMKpLMoJfUxTqsQfRPh6cg v7FZMyUszKcJe7vRl5YMgJjYQN+e7wRMt4BoTuaIV1QSMtRsxV3a85raeS369HHzmSGk gFfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ikq01ZwB7jcQN90UQxvnJC+1ZRqG1jrn8saiOK3gjb4=; b=tMVs8w/SUxL2Fe7M15T71pIa2tuLB26PAQvTr41uvpSgr2jdiCs/JvVrz9cXGGBQ6N 5D41gEWjLTt9RQJQbjue+MGy6gHRa8DsCef82XYXtNRZSTnWY/kodoVv4HTYgBkRVOpu 5+eObiZzKmGgkC8jWzZtEm1VuzjGNjRv/It82az88LtG4UWyr4OHazElx5X7DJjH+d/q QWVJG8D6nnYHVK6gTFquh6yPUBCWa8nqA3XUsqNDtmd9fAub0KezNE6thPMfoSZf9lsw aJm/Qel8tOu36ruQv0At6ShcJbYodYortixg6HBqLD8lz+pdiuM/Srmu4bVK4uW4hR2j lQxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=tucfBu3Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go21si6245946plb.368.2019.02.21.07.33.22; Thu, 21 Feb 2019 07:33:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=tucfBu3Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbfBUPaw (ORCPT + 99 others); Thu, 21 Feb 2019 10:30:52 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:40990 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfBUPav (ORCPT ); Thu, 21 Feb 2019 10:30:51 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1LFSnGG032797; Thu, 21 Feb 2019 15:30:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=ikq01ZwB7jcQN90UQxvnJC+1ZRqG1jrn8saiOK3gjb4=; b=tucfBu3YF+9DlCGkLdIYgCno78ml6g6sZzcxk6rEuv03vXsBND0SmCaeFAaF8wBFFnIh 4sV0UtdNf5j5cyZGBUhTCCvNEEx9l8j7GpwFlVMPsconDes9N/s1R6mBLcaptFT2WxMn tQLodj4wc+26rvdJH5YbqTL8OV3W9X/PNP0d4sWlRVNdO87oOmXQxIa72KcBDaaComAH hIJlMKAQEZYyjsNIXWXpeLL6otuauyXxLtyqBsNm3EmuAY9KcZNWfsRWiw9hoxPxLuAZ MyrYUFDhDZE6IsE7TTlkJC3h2gX/gJ4yte0v7nL1hkNoUUPwcCHoN7ra0QIen5O4H1AB jg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2qp81egvey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Feb 2019 15:30:46 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1LFUe6H001916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Feb 2019 15:30:40 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1LFUdDC017841; Thu, 21 Feb 2019 15:30:40 GMT Received: from linux.cn.oracle.com (/10.182.69.106) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Feb 2019 07:30:39 -0800 From: Dongli Zhang To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, jack@suse.cz Subject: [PATCH v2 1/2] loop: do not print warn message if partition scan is successful Date: Thu, 21 Feb 2019 23:33:42 +0800 Message-Id: <1550763223-21764-2-git-send-email-dongli.zhang@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550763223-21764-1-git-send-email-dongli.zhang@oracle.com> References: <1550763223-21764-1-git-send-email-dongli.zhang@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9174 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=997 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902210112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do not print warn message when the partition scan returns 0. Fixes: d57f3374ba48 ("loop: Move special partition reread handling in loop_clr_fd()") Signed-off-by: Dongli Zhang Reviewed-by: Jan Kara --- drivers/block/loop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index cf55389..7908673 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1115,8 +1115,9 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) err = __blkdev_reread_part(bdev); else err = blkdev_reread_part(bdev); - pr_warn("%s: partition scan of loop%d failed (rc=%d)\n", - __func__, lo_number, err); + if (err) + pr_warn("%s: partition scan of loop%d failed (rc=%d)\n", + __func__, lo_number, err); /* Device is gone, no point in returning error */ err = 0; } -- 2.7.4