From patchwork Thu Jan 31 15:45:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 10790837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34EB8184E for ; Thu, 31 Jan 2019 15:45:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 281A3290D2 for ; Thu, 31 Jan 2019 15:45:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C38E30FCE; Thu, 31 Jan 2019 15:45:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C28C1290D2 for ; Thu, 31 Jan 2019 15:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387621AbfAaPpa (ORCPT ); Thu, 31 Jan 2019 10:45:30 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43777 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729342AbfAaPpa (ORCPT ); Thu, 31 Jan 2019 10:45:30 -0500 Received: by mail-wr1-f65.google.com with SMTP id r10so3791805wrs.10 for ; Thu, 31 Jan 2019 07:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=E4MKslIV05xWh4l1wKj2vgGSS530K1EBt3sGfeVP3ow=; b=dD2FMbgvqAF5xFApR5UqN0fAZE0Y+Nk8IrSn2B8JSDEgpiIGbV8sVruxsd9m3js6eh 9dEli0cHu4W04UwOABoeVSMTmZ/ppFOejQ3oAuVCjmL1PjhVZXMBTfDYLFMZG8m1N6ts ep8fC6pbfHW3V3B6si0sCm2gxvsiVMA5SMsKKvp5gDCuRunK3Vj8gTcfUIaxBWZesmYO I1fQwWTx65liLifgZ3qcjRp5P4dlKzdreR3XqY5m+liOY1Tp0vq2WJbpk8FZ5v4NsaGK gX3N8qiC803nlAlrgpTbxeu6oMU3hTQwHAgqJpFxw7JZs765+Qss4h3O8rrszDhaTU+D gLwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=E4MKslIV05xWh4l1wKj2vgGSS530K1EBt3sGfeVP3ow=; b=dTpN8FYpYPWlNn+vhS04Hf9VYLDmm6KT7N2U361axQif4vmoaLrLSNOoWmzq/EBVsL oUxwIYqvCV+CNTr//DZBfiusFFEZQhQ7FbogxgBlLmnvQG/X62cskJozdZAVdxfeC5ER mVcuq6YeGaqxeS9Crc2OMCdb8uiY07aI6jsbZEIrQsovadv0WVhH6ryDkBpqE3MAOilZ a2LaCO0gHqew76jJM6Gh0QxrPQ7ie9MDMxneArsTgsVsLnZ+dC8zcDheSfs3YidIBnlh gMlKH6PYT+Ohmb19FyGITSMaKIFCkMEcJ+B8DECXaGNv7xC2CAh6W9dswg46rLyxVaVB iVtg== X-Gm-Message-State: AJcUukc3BlI2o/xSNjRLOoSB2b9aONcF5bJqFzFw/q0Fkn3t21/R9Fks 09yYbrIoVnF+bbOiAI+bsBcNQUiw X-Google-Smtp-Source: ALg8bN5K4g/FwuyZba3BkubORSJPUk5eTIbEJSksyfvgL9O/nk5PsabImVm4FPCbpdQDZMWugRo9tg== X-Received: by 2002:adf:ee46:: with SMTP id w6mr35772259wro.261.1548949528552; Thu, 31 Jan 2019 07:45:28 -0800 (PST) Received: from orange.redhat.com (ovpn-brq.redhat.com. [213.175.37.11]) by smtp.gmail.com with ESMTPSA id w16sm5736168wrp.1.2019.01.31.07.45.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Jan 2019 07:45:27 -0800 (PST) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH v2 1/3] rbd: get rid of obj_req->obj_request_count Date: Thu, 31 Jan 2019 16:45:06 +0100 Message-Id: <20190131154508.26050-2-idryomov@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20190131154508.26050-1-idryomov@gmail.com> References: <20190131154508.26050-1-idryomov@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is effectively unused. Signed-off-by: Ilya Dryomov --- drivers/block/rbd.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 2f91dee0ab5f..7f78b814d57f 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -291,7 +291,6 @@ struct rbd_img_request { int result; /* first nonzero obj_request result */ struct list_head object_extents; /* obj_req.ex structs */ - u32 obj_request_count; u32 pending_count; struct kref kref; @@ -1345,7 +1344,6 @@ static inline void rbd_img_obj_request_add(struct rbd_img_request *img_request, /* Image request now owns object's original reference */ obj_request->img_request = img_request; - img_request->obj_request_count++; img_request->pending_count++; dout("%s: img %p obj %p\n", __func__, img_request, obj_request); } @@ -1355,8 +1353,6 @@ static inline void rbd_img_obj_request_del(struct rbd_img_request *img_request, { dout("%s: img %p obj %p\n", __func__, img_request, obj_request); list_del(&obj_request->ex.oe_item); - rbd_assert(img_request->obj_request_count > 0); - img_request->obj_request_count--; rbd_assert(obj_request->img_request == img_request); rbd_obj_request_put(obj_request); } @@ -1672,7 +1668,6 @@ static void rbd_img_request_destroy(struct kref *kref) for_each_obj_request_safe(img_request, obj_request, next_obj_request) rbd_img_obj_request_del(img_request, obj_request); - rbd_assert(img_request->obj_request_count == 0); if (img_request_layered_test(img_request)) { img_request_layered_clear(img_request);