From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode() Date: Tue, 02 Oct 2007 13:32:30 +0100 Message-ID: <11826.1191328350@redhat.com> References: <963DCFBD-9E68-488E-BD2C-D8B751E65BDF@zabbo.net> <20071001130921.29339.72876.stgit@warthog.procyon.org.uk> <20071001130958.29339.31669.stgit@warthog.procyon.org.uk> <20071001173930.GA7718@mami.zabbo.net> <20071001180601.GA9417@infradead.org> Cc: dhowells@redhat.com, Christoph Hellwig , viro@ftp.linux.org.uk, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Zach Brown , Linus Torvalds Return-path: Received: from mx1.redhat.com ([66.187.233.31]:43730 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752755AbXJBMcn (ORCPT ); Tue, 2 Oct 2007 08:32:43 -0400 In-Reply-To: <963DCFBD-9E68-488E-BD2C-D8B751E65BDF@zabbo.net> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Zach Brown wrote: > /* haha, continuing the fine tradition of terrible names in this api.. */ > static inline void *PTR_PTR(void *err_ptr) { > BUG_ON(!IS_ERR(err_ptr) || !err_ptr); > return err_ptr; > } How about ERR_CAST() instead? Or maybe CAST_ERR()? struct dentry *blah(...) { struct inode *inode; inode = thing(...); if (IS_ERR(inode)) return ERR_CAST(inode); } Where ERR_CAST is defined as: static inline void *ERR_CAST(const void *error) { return (void *) x; } David