Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp851954img; Fri, 22 Mar 2019 09:55:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyirx8dzKuIjVz9boip6ZdJlv/UCLxItf0uL/vavgBpVLJcdOKmm9wYWQ8zXehyfiHbRdkq X-Received: by 2002:a63:9a4a:: with SMTP id e10mr9520807pgo.366.1553273711673; Fri, 22 Mar 2019 09:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553273711; cv=none; d=google.com; s=arc-20160816; b=y3BM2jcbOT2oAYNTUAWNihnOyUB5XXFiEiy6WPzGvLb6v2VGDh3nHdfzdjxN+nKPPp 89B3kzBnYjufrcNFsD5muM1z7Vkx3s/FISTq0LQelU6hDv5/ZLcuo55uw9Nq0KwA5V9S LFkyb2+8+cYOj6ktTd9rm+pbhtXDGBu8CJgbOqhEtncVM42H+MnfpttVDdadu7mArtfI GMgpE6yFDPTTp8aJHJkb+YfLDKPJwDliZBzCiQ7DNNGsqoWg8auwdJdF2pVINTKvcve1 m2G/NcnbeI5RczAKer3cvS6lVSU1JSUHLySsGpOKkc3nIjEv8qEIqo3HDz6iwEh81iJo yICg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=c+GtQqlpmzjk6COVm6jDau9Cy6moFEGDc/nAn+Qke7c=; b=TxrJZgT18TR5IFBRnQU2RYnUKoDkt76wA9pHSBoe3cTcSdiQgIvNu7QaWKY6JGR3g4 NDp2ITfMY94WSINe4qOTUWfJaC+sVPtCil/khUYCdHleuwIRpuOEKp+mhASbBIdDDcJu IDvq78nRnU9FH1qBO7ZeK538P9ho2Rc6F/jn/ptKYIv/beoesD/j4eJsNrs+E+Ffp9u2 rcEv5lW9aqwoHa+NVzYhs8T6sQdMAOnOgF0JQF89/JGYRYQn/nVzdMxsvTJ7R+L5LEXB 4L7oJlQg/hbo38NYbiK8ms+6on39LbFw9mzFW+jOIJSoBBQ4iLlTf3worQE8s0ZX02rq muSA== 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 37si7469529plv.277.2019.03.22.09.54.56; Fri, 22 Mar 2019 09:55:11 -0700 (PDT) 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 S1727882AbfCVQyQ (ORCPT + 99 others); Fri, 22 Mar 2019 12:54:16 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59785 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727105AbfCVQyQ (ORCPT ); Fri, 22 Mar 2019 12:54:16 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1M8k65-1h2gTH00P3-004mJ7; Fri, 22 Mar 2019 17:54:06 +0100 From: Arnd Bergmann To: Ilya Dryomov , Sage Weil , Alex Elder , Jens Axboe Cc: Arnd Bergmann , Jason Dillaman , ceph-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rdb: convert all rbd_assert(0) to BUG() Date: Fri, 22 Mar 2019 17:53:56 +0100 Message-Id: <20190322165404.2859356-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:9kgBA2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ernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rbd_assert(0) has caused different issues depending on the compiler version in the past, so it seems better to avoid it completely. Replace the remaining instances. Signed-off-by: Arnd Bergmann --- drivers/block/rbd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index cbcc3baf3807..564c5069cc78 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1342,7 +1342,7 @@ static void rbd_obj_zero_range(struct rbd_obj_request *obj_req, u32 off, zero_bvecs(&obj_req->bvec_pos, off, bytes); break; default: - rbd_assert(0); + BUG(); } } @@ -1597,7 +1597,7 @@ static void rbd_obj_request_destroy(struct kref *kref) kfree(obj_request->bvec_pos.bvecs); break; default: - rbd_assert(0); + BUG(); } kfree(obj_request->img_extents); @@ -1797,7 +1797,7 @@ static void rbd_osd_req_setup_data(struct rbd_obj_request *obj_req, u32 which) &obj_req->bvec_pos); break; default: - rbd_assert(0); + BUG(); } } @@ -2052,7 +2052,7 @@ static int __rbd_img_fill_request(struct rbd_img_request *img_req) ret = rbd_obj_setup_zeroout(obj_req); break; default: - rbd_assert(0); + BUG(); } if (ret < 0) return ret; @@ -2531,7 +2531,7 @@ static int rbd_obj_issue_copyup_ops(struct rbd_obj_request *obj_req, u32 bytes) num_osd_ops += count_zeroout_ops(obj_req); break; default: - rbd_assert(0); + BUG(); } obj_req->osd_req = rbd_osd_req_create(obj_req, num_osd_ops); @@ -2558,7 +2558,7 @@ static int rbd_obj_issue_copyup_ops(struct rbd_obj_request *obj_req, u32 bytes) __rbd_obj_setup_zeroout(obj_req, which); break; default: - rbd_assert(0); + BUG(); } ret = ceph_osdc_alloc_messages(obj_req->osd_req, GFP_NOIO); -- 2.20.0