From patchwork Sat May 29 09:44:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103024 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4T9iY8q026492 for ; Sat, 29 May 2010 09:44:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754116Ab0E2Joc (ORCPT ); Sat, 29 May 2010 05:44:32 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:36197 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327Ab0E2Job (ORCPT ); Sat, 29 May 2010 05:44:31 -0400 Received: by ewy8 with SMTP id 8so554822ewy.28 for ; Sat, 29 May 2010 02:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=znv55KVv8LHqXS2baHQKNjwZyl6GdZTpbM3KQo9Pd5Q=; b=Vf9y9lTx2zup3jPN44qZFzj5KChpaHzM3eXmQYmpnzWRx/5lg1cnoMbLlqF7Tzlrxx OliRbD0xKuqvq+wdNWfonkqpdUwUN6GOjpYJR+onyifk8KG1ipYYEm+KSOZrOMj5OKcy MuuKaWpohtv4dJ3PouMGoHkLZxFEvkfR+kqHQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=v+PfSII6hMj78GmRQvsYU9aat4xmqNuiw69Q0Yq9flHtk8nF6f06pifQkhZHMkwQdP GkJL7pe3q0pYRx6BxC2O0Ya474Xkotm3BZ9XdYAXiJxk/LyIADAvalCAr4617vi8Yy5k QtIKI/TZKZ4a4FxpSnixC/QKGt7yqx1nbexRM= Received: by 10.213.32.135 with SMTP id c7mr3719310ebd.18.1275126269332; Sat, 29 May 2010 02:44:29 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 14sm1722699ewy.6.2010.05.29.02.44.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:44:29 -0700 (PDT) Date: Sat, 29 May 2010 11:44:10 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Yan Zheng , Josef Bacik , Jens Axboe , Christoph Hellwig , kernel-janitors@vger.kernel.org, Chris Mason Subject: [patch 4/11] btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs Message-ID: <20100529094410.GE5483@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 29 May 2010 09:44:34 +0000 (UTC) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 73895ba..34f7c37 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1985,6 +1985,10 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->fs_root = btrfs_read_fs_root_no_name(fs_info, &location); if (!fs_info->fs_root) goto fail_trans_kthread; + if (IS_ERR(fs_info->fs_root)) { + err = PTR_ERR(fs_info->fs_root); + goto fail_trans_kthread; + } if (!(sb->s_flags & MS_RDONLY)) { down_read(&fs_info->cleanup_work_sem);