From patchwork Tue May 7 01:38:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2529811 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B0CD5DF230 for ; Tue, 7 May 2013 01:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759555Ab3EGBiS (ORCPT ); Mon, 6 May 2013 21:38:18 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:63886 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756983Ab3EGBiS (ORCPT ); Mon, 6 May 2013 21:38:18 -0400 Received: by mail-ie0-f179.google.com with SMTP id c13so52415ieb.38 for ; Mon, 06 May 2013 18:38:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=u4gjciXwQSir/DTKhl5BG2puyjMgkbJsQwg6wQGEt+o=; b=M6ocFJ2yLik+rSm1c1MrxToEFu4PI8B/9l551CgMBnz3C5MzEFEpHLZe+CacCXsmE7 z1BYvPJ6b4vbmdwNj5XZ7Q7VbsJNjgr6KFzhbaWua8y9JihtZUsKSGPB2V7mmqKwFEnq XP//XGzaEWNhTI+zjhaUr06riIUDexB7HAvIBKuLgELuJ1U3bUajfG90z/CS20dyngDG 0YyiFlaIj7VVUmXHVH8A1nQ9V74zHk94XPcwhfzDtQJdQeoYkONHpHerY4X5Dh2BmjZZ VOY/kyStMdOPL9O2+Pp2CiMRo0P6tdsRrOIQMW4PlI2XSGfLRvOge8+Tdo+mHY2pH00T A8nQ== X-Received: by 10.50.106.52 with SMTP id gr20mr3488518igb.109.1367890698060; Mon, 06 May 2013 18:38:18 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id xf4sm5147767igb.8.2013.05.06.18.38.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 18:38:17 -0700 (PDT) Message-ID: <51885B08.6080907@inktank.com> Date: Mon, 06 May 2013 20:38:16 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 5/6] rbd: kill rbd_dev_clear_mapping() References: <51885A97.9070005@inktank.com> In-Reply-To: <51885A97.9070005@inktank.com> X-Gm-Message-State: ALoCoQniHWogX1hFm4YrPfYc2k/DQIt+Cuq3V7kZNi5yfaAbewx5cUlKKaZg77jkn4lUUru9TYKN Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org This function is a duplicate of rbd_dev_mapping_clear(), and was added by mistake. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) char *name; @@ -4910,7 +4903,7 @@ static void rbd_dev_device_release(struct device *dev) rbd_free_disk(rbd_dev); clear_bit(RBD_DEV_FLAG_EXISTS, &rbd_dev->flags); - rbd_dev_clear_mapping(rbd_dev); + rbd_dev_mapping_clear(rbd_dev); unregister_blkdev(rbd_dev->major, rbd_dev->name); rbd_dev->major = 0; rbd_dev_id_put(rbd_dev); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 5eebf6d..530793a 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -966,13 +966,6 @@ static void rbd_dev_mapping_clear(struct rbd_device *rbd_dev) rbd_dev->mapping.read_only = true; } -static void rbd_dev_clear_mapping(struct rbd_device *rbd_dev) -{ - rbd_dev->mapping.size = 0; - rbd_dev->mapping.features = 0; - rbd_dev->mapping.read_only = true; -} - static const char *rbd_segment_name(struct rbd_device *rbd_dev, u64 offset) {