From patchwork Mon Apr 29 18:00:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2500961 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 1A33EDF25A for ; Mon, 29 Apr 2013 18:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758540Ab3D2San (ORCPT ); Mon, 29 Apr 2013 14:30:43 -0400 Received: from mail-gg0-f175.google.com ([209.85.161.175]:33438 "EHLO mail-gg0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757950Ab3D2Sam (ORCPT ); Mon, 29 Apr 2013 14:30:42 -0400 X-Greylist: delayed 1466 seconds by postgrey-1.27 at vger.kernel.org; Mon, 29 Apr 2013 14:30:42 EDT Received: by mail-gg0-f175.google.com with SMTP id l2so225428ggn.6 for ; Mon, 29 Apr 2013 11:30:42 -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=Sh8344cjCQm3tzTL6iPYF954VIQLGp6q+Ueqp+LJrWw=; b=TnqZg6xhrh3r9a4PG2W3YlSGX2KHjN4+k3PzcUy4++bviJIjq6HkbfLclCJX1x8+tL 6C72ICImSEu9Y4qO1LZBVEvr/mED460leVv3+t/VONclGGUARvwiOyLNakTGSi3l3FOt My9PaB1QS2MfizGSk/Nz/Ud86GRUl7x6KSssDAi8S2/EwptiFbQSYRaQvUvQsq4BDxst ctPkECzA8HRPi+QKPVRtyMNE4J+FR3kHL8Vls8HLeXV60z0DThctBWXDxLZSrA9NaYnG W9raGHRbBI3BbUfD5j1sTUApokxjg84qN+fvp1WB8ybTuWi4Y8A7PcmdhIrXoHJOFANj YPcA== X-Received: by 10.236.177.7 with SMTP id c7mr31790763yhm.200.1367258423507; Mon, 29 Apr 2013 11:00:23 -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 o49sm5303553yhj.3.2013.04.29.11.00.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 11:00:22 -0700 (PDT) Message-ID: <517EB535.9060308@inktank.com> Date: Mon, 29 Apr 2013 13:00:21 -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 1/5] rbd: drop module later References: <517EB4F0.1070607@inktank.com> In-Reply-To: <517EB4F0.1070607@inktank.com> X-Gm-Message-State: ALoCoQnl98Y5/bOfbgwVCQyBwCnnPzdk2775T1BHDcmHAXcnBp7YLZVTdnEj2sB0acSe7pA0CRmL Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Drop the module reference at the end of rbd_remove() for symmetry with adding a reference at the top of rbd_add(). Signed-off-by: Alex Elder --- drivers/block/rbd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ac94aa4..5904819 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4986,9 +4986,6 @@ static void rbd_dev_release(struct device *dev) rbd_spec_put(rbd_dev->parent_spec); kfree(rbd_dev->header_name); rbd_dev_destroy(rbd_dev); - - /* release module ref */ - module_put(THIS_MODULE); } static void rbd_dev_remove_parent(struct rbd_device *rbd_dev) @@ -5071,6 +5068,7 @@ static ssize_t rbd_remove(struct bus_type *bus, rbd_remove_all_snaps(rbd_dev); rbd_bus_del_dev(rbd_dev); + module_put(THIS_MODULE); done: mutex_unlock(&ctl_mutex);