From patchwork Sat May 29 09:42:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103022 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 o4T9gnna026129 for ; Sat, 29 May 2010 09:42:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754739Ab0E2Jmq (ORCPT ); Sat, 29 May 2010 05:42:46 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:52380 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754090Ab0E2Jmp (ORCPT ); Sat, 29 May 2010 05:42:45 -0400 Received: by ewy8 with SMTP id 8so554553ewy.28 for ; Sat, 29 May 2010 02:42:43 -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=G542ojDuyj7NewHRMtBGGPjV/lJCTDC0vGi+NQxairA=; b=qytuYT5czinD3zqZT4ve290/bOneXijnWVYYzSzPUpENkse59q2jUhw5qS5EQswSq/ mBWd4aMVRxRzRHRkuBtFGma/7cv64V+KxSl+u/pNuEAwGBS5ES48rg8851l8mDRIe/31 lGVBHTketRQ1UPHNV98N+5AN9O9C3CiUPiHJk= 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=NC3s3zyoZbk1ZCz/RnRUDc8YZV7Eo2ljyb1tmdDHF0UkMSUjPbh+YUJ+8V6Is5RKXP UeqGm/hyFg1wVH8i5tEa9RO2xfGCMn0wxMyIeEcUwvFDHaZ5un014j5i5cszj8pCv9xO 1tPsVlqKQlkXEw9SaLp26ZiitzTpysfGpyCSU= Received: by 10.213.10.8 with SMTP id n8mr796423ebn.41.1275126163392; Sat, 29 May 2010 02:42:43 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 13sm1705519ewy.5.2010.05.29.02.42.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:42:43 -0700 (PDT) Date: Sat, 29 May 2010 11:42:19 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Yan Zheng , Josef Bacik , Christoph Hellwig , Chris Mason , kernel-janitors@vger.kernel.org Subject: [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR Message-ID: <20100529094219.GC5483@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:42:49 +0000 (UTC) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 28b53f1..f2393b3 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -392,8 +392,8 @@ setup_root: location.offset = 0; inode = btrfs_iget(sb, &location, new_root, &new); - if (!inode) - return ERR_PTR(-ENOMEM); + if (IS_ERR(inode)) + return ERR_CAST(inode); /* * If we're just mounting the root most subvol put the inode and return