From patchwork Sat May 29 09:40:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103021 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 o4T9fUVP025760 for ; Sat, 29 May 2010 09:41:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753781Ab0E2Jl0 (ORCPT ); Sat, 29 May 2010 05:41:26 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:43376 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173Ab0E2JlZ (ORCPT ); Sat, 29 May 2010 05:41:25 -0400 Received: by ewy8 with SMTP id 8so554348ewy.28 for ; Sat, 29 May 2010 02:41:23 -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=2fgRwqBgdKBZIJpkldL4ANmPN2SdWjlxNQElBlrc3BU=; b=ASJZfKXx83ynMTt/kxZuoVbum2D/Un+XAIvklzbVPepcHMqsRCWczaHtH3wiJco1hk qv9+pKX1XpLtAaHc+t14P8qExnWspL+CSbVNSyW33wk/5c3FLXlxZ6yMXip1hGq/w63v kWi89+/btXNOka2RDjf+2YIkWTUkhnJaAFy5Y= 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=UNMmYrHZVQQVWAEtB7rCOHJM8c4bs6W7z2lRTqs3rnXPNZNlC0KoyBDZBZ2jJGP5DN OV0kX/0CUkfIztLPQ1zwMfXkOh3hj1NzR3C0Rn3FGBD+iqSP+F8kcee+5u+l0fQ3muEW VEwJ43aRKts50nBckUrVC8YuNMbbxB7G5MlPo= Received: by 10.213.35.79 with SMTP id o15mr783984ebd.35.1275126083753; Sat, 29 May 2010 02:41:23 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 14sm1721248ewy.6.2010.05.29.02.41.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:41:23 -0700 (PDT) Date: Sat, 29 May 2010 11:40:57 +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 1/11] btrfs: handle error returns from btrfs_lookup_dir_item() Message-ID: <20100529094056.GB5483@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:41:30 +0000 (UTC) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d34b2df..28b53f1 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -360,6 +360,8 @@ static struct dentry *get_default_root(struct super_block *sb, */ dir_id = btrfs_super_root_dir(&root->fs_info->super_copy); di = btrfs_lookup_dir_item(NULL, root, path, dir_id, "default", 7, 0); + if (IS_ERR(di)) + return ERR_CAST(di); if (!di) { /* * Ok the default dir item isn't there. This is weird since