From patchwork Thu Jul 19 14:25:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guangliang Zhao X-Patchwork-Id: 1217011 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 348333FD48 for ; Thu, 19 Jul 2012 14:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420Ab2GSO0M (ORCPT ); Thu, 19 Jul 2012 10:26:12 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:57673 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287Ab2GSO0J (ORCPT ); Thu, 19 Jul 2012 10:26:09 -0400 Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by victor.provo.novell.com with ESMTP (NOT encrypted); Thu, 19 Jul 2012 08:25:50 -0600 From: Guangliang Zhao To: ceph-devel@vger.kernel.org Cc: yehuda@inktank.com, sage@inktank.com Subject: [PATCH] rbd: fix the repeat initialization of semaphore Date: Thu, 19 Jul 2012 22:25:08 +0800 Message-Id: <1342707908-7747-1-git-send-email-gzhao@suse.com> X-Mailer: git-send-email 1.7.3.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The header_rwsem of rbd_dev initializes twice in function rbd_add. Signed-off-by: Guangliang Zhao --- drivers/block/rbd.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 013c7a5..50117dd 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2381,8 +2381,6 @@ static ssize_t rbd_add(struct bus_type *bus, INIT_LIST_HEAD(&rbd_dev->snaps); init_rwsem(&rbd_dev->header_rwsem); - init_rwsem(&rbd_dev->header_rwsem); - /* generate unique id: find highest unique id, add one */ rbd_id_get(rbd_dev);