summaryrefslogtreecommitdiff
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorDongli Zhang <dongli.zhang@oracle.com>2019-02-22 22:10:19 +0800
committerJens Axboe <axboe@kernel.dk>2019-02-22 15:51:21 -0700
commit40853d6fc619a6fd3d3177c3973a2eac9b598a80 (patch)
tree912737aa171d5325264067697364fcdd811e2fd2 /drivers/block/loop.c
parent8f4e80da764ec1ca44c83f3e17dbc9bf0209bccc (diff)
loop: do not print warn message if partition scan is successful
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> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3d63ad036398..e25df5ea9792 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1115,8 +1115,9 @@ out_unlock:
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;
}