From patchwork Thu Jul 26 19:08:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1244241 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 62B34DFFCE for ; Thu, 26 Jul 2012 19:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484Ab2GZTIp (ORCPT ); Thu, 26 Jul 2012 15:08:45 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:64259 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472Ab2GZTIo (ORCPT ); Thu, 26 Jul 2012 15:08:44 -0400 Received: by mail-gg0-f174.google.com with SMTP id u4so2340802ggl.19 for ; Thu, 26 Jul 2012 12:08:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=m+02swj7GqstH3Lj2LQ1J2kWw6wqdPy+0h1lhWPfZCg=; b=mjAgE/Tg92zd+iWrq0kfQLnYmAum3CHZPwguBV2UaceGBHPfkLct6qmuamy0l+95mt 4jHiGW6YwplPIXR5iF3Q1bqC2FVCJDU7cZ2vDDx0CtP+1QWHa5MTC//qxDFEw7+Y9nWL 9sbdypsCX0CHNad7htQl4fZ0w597an4hZ03roqac0HevzUD8rH1nm9LB8PkanbDfDXo3 0UbJCjRbRGMwvDJ/jArPdV+0vOM3fmsIGV/agqQpyhmjQ6MYsFsH7oC/7uXS58bUO5Ca jdysYvXPg636Q85SB3/apEwpgKBKR6T2xvWcVj8seM/hGTCrsene3Nc1fNrP5+g5G0SF AA8A== Received: by 10.236.180.130 with SMTP id j2mr28444952yhm.14.1343329724634; Thu, 26 Jul 2012 12:08:44 -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 ESMTPS id j17sm40759anl.5.2012.07.26.12.08.43 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 12:08:44 -0700 (PDT) Message-ID: <501195BB.8030401@inktank.com> Date: Thu, 26 Jul 2012 14:08:43 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 3/7] rbd: pass null version pointer in add_snap() References: <50119421.1090702@inktank.com> In-Reply-To: <50119421.1090702@inktank.com> X-Gm-Message-State: ALoCoQlS1zr0498KUNjLZpJSDQqidtYsDCJztrNPf425JjhMfsNZmxw5wHqOMyyRy0YRDi2i+47t Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org rbd_header_add_snap() passes the address of a version variable to rbd_req_sync_exec(), but it ignores the result. Just pass a null pointer instead. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) /* we should create a snapshot only if we're pointing at the head */ @@ -1689,7 +1688,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, "rbd", "snap_add", - data, p - data, &ver); + data, p - data, NULL); kfree(data); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 4d8b52c..eacf255 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1664,7 +1664,6 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev, u64 new_snapid; int ret; void *data, *p, *e; - u64 ver; struct ceph_mon_client *monc;