Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp362120imp; Thu, 21 Feb 2019 03:02:32 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaf17EoIzj4IYIfe+bkbTYJAC7w0NNx8JrzkctLbXqAMJZ/tNWqX48fYeKMdFd+7ZkTZrQ2 X-Received: by 2002:a17:902:e486:: with SMTP id cj6mr41709994plb.86.1550746952598; Thu, 21 Feb 2019 03:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550746952; cv=none; d=google.com; s=arc-20160816; b=rJgETqH09cu+iwGjz5D49x9v6pqHzXHgyD7PsrUIt2tqKXKuaWIKmX4hnf19UHw/jG kP1ZCn/4r7mUFjhWZF7FrF8Y6t1kdzkkfIJOQQf9vaqojV+KDH8fpQ+pgEEx7YS7KgOM fscy9QjB9pEzW7GPO73BJR5TmMEy5vuREnAMujRgGAA2a1B+YVPJ+vP+MD2Z4TCAOUjt 24B4q9ve+NHXcyHKdEBg/QgFxsTHsSDqVF574d/LlfP9I5iFD2L/tHD0LT4lcPLTbXZD ZX+dTtdKEdlsxOo8ERS53prAUlHTmErAA3ze29PNEb2HYPc3wH2CR86ipTL8VWjb2LHu dlHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LPoBtOD4ell9a2Hm8olgqECiGL/dcToe6Xr4ehizlvA=; b=veSC2uphy+DZLaI/vCYBN/AuL+e3l6aaXoOOvReVUTAWmL2nQOWjJjtJqQDj87TuCT LpsSdsa9pHYUy4p4nWMUWafGX56nl0U6jCRgW+Cyi/Bn54htdAOt3Yr1bnV11U4Jg795 8I/27gmzuvZPEFFuI3UgwwI6EgnWlamFe/3t7fd6W303YlXYtIEDGtR6MTf3ZuIEqIOB YeXve0r31TjayXIt8h61028u0hUgkKn+w57Pb0Y/vMaFqHJeggBwK98ERRbH/FtZv8Jc OAQGyo0qRpl0gblAgGU75VVrrIkSfzespgCpbOQpDhHNiBCdwm7uHhA73Pvz9AhRC+9g wGvw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si14595553plr.348.2019.02.21.03.02.16; Thu, 21 Feb 2019 03:02:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbfBULBx (ORCPT + 99 others); Thu, 21 Feb 2019 06:01:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:39530 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725814AbfBULBw (ORCPT ); Thu, 21 Feb 2019 06:01:52 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AD1A4AEFE; Thu, 21 Feb 2019 11:01:51 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 29DE11E0900; Thu, 21 Feb 2019 12:01:51 +0100 (CET) Date: Thu, 21 Feb 2019 12:01:51 +0100 From: Jan Kara To: Dongli Zhang Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@kernel.dk, jack@suse.cz Subject: Re: [PATCH 1/2] loop: do not print warn message if partition scan is successful Message-ID: <20190221110151.GE27474@quack2.suse.cz> References: <1550722655-15102-1-git-send-email-dongli.zhang@oracle.com> <1550722655-15102-2-git-send-email-dongli.zhang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1550722655-15102-2-git-send-email-dongli.zhang@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 21-02-19 12:17:34, Dongli Zhang wrote: > 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 Yeah, thanks for the fix! Not sure how come I didn't see this in my testing. You can add: Reviewed-by: Jan Kara Honza > --- > 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 > -- Jan Kara SUSE Labs, CR