From patchwork Thu Aug 26 09:07:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 133931 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 o7Q99OQH025781 for ; Thu, 26 Aug 2010 09:09:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564Ab0HZJJX (ORCPT ); Thu, 26 Aug 2010 05:09:23 -0400 Received: from mail-qy0-f181.google.com ([209.85.216.181]:37306 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445Ab0HZJJX (ORCPT ); Thu, 26 Aug 2010 05:09:23 -0400 Received: by qyk33 with SMTP id 33so1483567qyk.19 for ; Thu, 26 Aug 2010 02:09:22 -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=uS4b/8PRT/mQRAXGYVkGdOGBLHPyTqqp/B9sFyzsBWc=; b=RyUEM7+g0l8SPA9dGs8Jec76hPJgAiApFwLZTdgcDxljLcyWxEk0gg38xhfx5Lmvgm HsWH6OQlO7QCpRDX+VpG7uKXvLhg3ZbNRLssl0GEltAFtSDV9MjxN8Vcf4mNV8XfUTdU UUzpyqNezFEjKIWUz863YP7AO1SDFPkZc/tvs= 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=MzhBkaS/vVg2Eaukmc3HDHP+r3t3/nYJC9c7jj/pZ5jSQIIGOUb+wwKZcAYy9shL20 cQ1gncDN+Xu8B0bbxPQRyL5pLqp3oaMzxohWllRbPXFk8xMDTQg1t9NQQvco0uEX/s8E 3DDta4kclfiwCExDJvp5iqduojLOtqkt89xLU= Received: by 10.229.211.21 with SMTP id gm21mr4882271qcb.135.1282813761985; Thu, 26 Aug 2010 02:09:21 -0700 (PDT) Received: from bicker ([41.205.146.22]) by mx.google.com with ESMTPS id r38sm2770881qcs.26.2010.08.26.02.09.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Aug 2010 02:09:21 -0700 (PDT) Date: Thu, 26 Aug 2010 11:07:24 +0200 From: Dan Carpenter To: Sage Weil Cc: Yehuda Sadeh , ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR Message-ID: <20100826090724.GA20072@bicker> 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 (demeter1.kernel.org [140.211.167.41]); Thu, 26 Aug 2010 09:09:24 +0000 (UTC) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 360c4f2..6fd8b20 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -171,6 +171,8 @@ static int mdsc_show(struct seq_file *s, void *p) } else if (req->r_dentry) { path = ceph_mdsc_build_path(req->r_dentry, &pathlen, &pathbase, 0); + if (IS_ERR(path)) + path = NULL; spin_lock(&req->r_dentry->d_lock); seq_printf(s, " #%llx/%.*s (%s)", ceph_ino(req->r_dentry->d_parent->d_inode), @@ -187,6 +189,8 @@ static int mdsc_show(struct seq_file *s, void *p) if (req->r_old_dentry) { path = ceph_mdsc_build_path(req->r_old_dentry, &pathlen, &pathbase, 0); + if (IS_ERR(path)) + path = NULL; spin_lock(&req->r_old_dentry->d_lock); seq_printf(s, " #%llx/%.*s (%s)", ceph_ino(req->r_old_dentry->d_parent->d_inode),