From patchwork Sat Jan 19 18:06:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Czarcinski X-Patchwork-Id: 2007241 Return-Path: X-Original-To: patchwork-linux-btrfs@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 47E6FDF2A2 for ; Sat, 19 Jan 2013 18:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752231Ab3ASSGq (ORCPT ); Sat, 19 Jan 2013 13:06:46 -0500 Received: from eastrmfepo203.cox.net ([68.230.241.218]:50982 "EHLO eastrmfepo203.cox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144Ab3ASSGc (ORCPT ); Sat, 19 Jan 2013 13:06:32 -0500 Received: from eastrmimpo110 ([68.230.241.223]) by eastrmfepo203.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20130119180631.YWCS21186.eastrmfepo203.cox.net@eastrmimpo110> for ; Sat, 19 Jan 2013 13:06:31 -0500 Received: from falcon.lcl ([68.100.144.189]) by eastrmimpo110 with cox id pu6Q1k00N45PsQc01u6XBF; Sat, 19 Jan 2013 13:06:31 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A010209.50FAE0A7.003E,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=N5Wr5hBB c=1 sm=1 a=xiXiwr23JuvKlkj6ngz4TA==:17 a=hVTc7nqkxc4A:10 a=103jMkqsgCkA:10 a=BIJj-m-0AAAA:8 a=38xAm4sxW9QA:10 a=9Wk4PYuB8VIistGRkGwA:9 a=LUue1KWhiSUA:10 a=xiXiwr23JuvKlkj6ngz4TA==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (CRAM-MD5) smtp.auth=gczarcinski@cox.net From: Gene Czarcinski To: linux-btrfs@vger.kernel.org Cc: Gene Czarcinski Subject: [PATCH 1/6] Fedora 18 - btrfs-init-dev-list.patch Date: Sat, 19 Jan 2013 13:06:16 -0500 Message-Id: <1358618781-26629-2-git-send-email-gene@czarc.net> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358618781-26629-1-git-send-email-gene@czarc.net> References: <1358618781-26629-1-git-send-email-gene@czarc.net> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Gene Czarcinski --- utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 938f9a5..51b78d5 100644 --- a/utils.c +++ b/utils.c @@ -477,7 +477,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, u64 num_devs; int ret; - device = kmalloc(sizeof(*device), GFP_NOFS); + device = kzalloc(sizeof(*device), GFP_NOFS); if (!device) return -ENOMEM; buf = kmalloc(sectorsize, GFP_NOFS); @@ -503,6 +503,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, device->bytes_used = 0; device->total_ios = 0; device->dev_root = root->fs_info->dev_root; + INIT_LIST_HEAD(&device->dev_list); ret = btrfs_add_device(trans, root, device); BUG_ON(ret);