lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] loop: do not print warn message if partition scan is successful
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 <dongli.zhang@oracle.com>

Yeah, thanks for the fix! Not sure how come I didn't see this in my
testing. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

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 <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2019-02-21 12:02    [W:0.890 / U:2.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site