From patchwork Mon Jan 24 19:55:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 501811 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0OJh2Za026265 for ; Mon, 24 Jan 2011 19:48:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718Ab1AXTgR (ORCPT ); Mon, 24 Jan 2011 14:36:17 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:36278 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895Ab1AXTgQ (ORCPT ); Mon, 24 Jan 2011 14:36:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 78DE819BB9B; Mon, 24 Jan 2011 20:36:15 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20721-18; Mon, 24 Jan 2011 20:36:12 +0100 (CET) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id 1DD0619BBD2; Mon, 24 Jan 2011 20:36:12 +0100 (CET) From: Julia Lawall To: Chris Mason Cc: kernel-janitors@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] fs/btrfs/inode.c: Add missing IS_ERR test Date: Mon, 24 Jan 2011 20:55:19 +0100 Message-Id: <1295898922-18822-2-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1295898922-18822-1-git-send-email-julia@diku.dk> References: <1295898922-18822-1-git-send-email-julia@diku.dk> 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 24 Jan 2011 19:48:26 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 160b55b..b322158 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4134,7 +4134,7 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) } srcu_read_unlock(&root->fs_info->subvol_srcu, index); - if (root != sub_root) { + if (!IS_ERR(inode) && root != sub_root) { down_read(&root->fs_info->cleanup_work_sem); if (!(inode->i_sb->s_flags & MS_RDONLY)) btrfs_orphan_cleanup(sub_root);