From patchwork Wed Aug 14 23:16:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zach Brown X-Patchwork-Id: 2844893 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 687189F239 for ; Wed, 14 Aug 2013 23:17:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F6F3206D2 for ; Wed, 14 Aug 2013 23:17:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C44F2206D0 for ; Wed, 14 Aug 2013 23:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933397Ab3HNXRi (ORCPT ); Wed, 14 Aug 2013 19:17:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57888 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933414Ab3HNXRX (ORCPT ); Wed, 14 Aug 2013 19:17:23 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7ENHN9P014651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Aug 2013 19:17:23 -0400 Received: from lenny.home.zabbo.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7ENHKSt017824 for ; Wed, 14 Aug 2013 19:17:22 -0400 From: Zach Brown To: linux-btrfs@vger.kernel.org Subject: [PATCH 10/15] btrfs-progs: fix qgroup realloc inheritance Date: Wed, 14 Aug 2013 16:16:40 -0700 Message-Id: <1376522205-16992-11-git-send-email-zab@redhat.com> In-Reply-To: <1376522205-16992-1-git-send-email-zab@redhat.com> References: <1376522205-16992-1-git-send-email-zab@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP qgroup.c:82:23: warning: memcpy with byte count of 0 qgroup.c:83:23: warning: memcpy with byte count of 0 The inheritance wasn't copying qgroups[] because a confused sizeof() gave 0 byte memcpy()s. It's been like this for the year since it was merged, so I guess this isn't a very important thing to do :). Signed-off-by: Zach Brown Reviewed-by: Arne Jansen --- qgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgroup.c b/qgroup.c index 038c4dc..86fe2b2 100644 --- a/qgroup.c +++ b/qgroup.c @@ -74,7 +74,7 @@ qgroup_inherit_realloc(struct btrfs_qgroup_inherit **inherit, int n, int pos) if (*inherit) { struct btrfs_qgroup_inherit *i = *inherit; - int s = sizeof(out->qgroups); + int s = sizeof(out->qgroups[0]); out->num_qgroups = i->num_qgroups; out->num_ref_copies = i->num_ref_copies;