From patchwork Wed Aug 25 07:11:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 131201 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7P7CTdb007537 for ; Wed, 25 Aug 2010 07:12:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854Ab0HYHMA (ORCPT ); Wed, 25 Aug 2010 03:12:00 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:48514 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631Ab0HYHL7 (ORCPT ); Wed, 25 Aug 2010 03:11:59 -0400 Received: by mail-wy0-f174.google.com with SMTP id 35so317248wyb.19 for ; Wed, 25 Aug 2010 00:11:58 -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:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=Oflt/yO7C34QcWFx+Ma19kFuGAryFTP6t9ylAKALUZA=; b=JOskB17sDYuNg30NMBYCnzaCn+MSoe5N+IOQGv0rwD8I6bQ8UmMMtJtdRil0PTH4i+ EuwYCCEw/coR/fh/ZwKcayt62FPdL3Brt2Gm2NW6y0TWIvLgqt16wyP730iJv8AY4GY2 yK39evz3mR4VI5/j6h/KncEHk0+z2aVSHZT+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=Mxuy55BilTKLsAwpzNFCyYgE+f3BlpUtQB/+lA8h51ns+mHtBVKHH7DAT7KV4TrVvk Vdsr+G2CUXUeCUvnIoHEB1XcBUWksLye66Nanff/QhGTjQqkj40rHtQXYVbZaAA0wj5H xBswApxIPHpkFEwRvoDPOE0lYFX+qOzoOBBqY= Received: by 10.216.4.19 with SMTP id 19mr6924318wei.110.1282720318728; Wed, 25 Aug 2010 00:11:58 -0700 (PDT) Received: from bicker ([41.205.146.22]) by mx.google.com with ESMTPS id w29sm609434weq.18.2010.08.25.00.11.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Aug 2010 00:11:57 -0700 (PDT) Date: Wed, 25 Aug 2010 09:11:35 +0200 From: Dan Carpenter To: Sage Weil Cc: Yehuda Sadeh , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ceph: ceph_get_inode() returns an ERR_PTR Message-ID: <20100825071135.GO29330@bicker> Mail-Followup-To: Dan Carpenter , Sage Weil , Yehuda Sadeh , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@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]); Wed, 25 Aug 2010 07:12:29 +0000 (UTC) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 5d893d3..1e623ec 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1229,11 +1229,11 @@ retry_lookup: in = dn->d_inode; } else { in = ceph_get_inode(parent->d_sb, vino); - if (in == NULL) { + if (IS_ERR(in)) { dout("new_inode badness\n"); d_delete(dn); dput(dn); - err = -ENOMEM; + err = PTR_ERR(in); goto out; } dn = splice_dentry(dn, in, NULL);