From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 3/3] XFS: Combine the XFS and Linux inodes V2 Date: Sun, 14 Sep 2008 09:31:28 -0400 Message-ID: <20080914133128.GE14266@infradead.org> References: <1221315027-29951-1-git-send-email-david@fromorbit.com> <1221315027-29951-4-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org To: Dave Chinner Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:39216 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbYINNbc (ORCPT ); Sun, 14 Sep 2008 09:31:32 -0400 Content-Disposition: inline In-Reply-To: <1221315027-29951-4-git-send-email-david@fromorbit.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Sep 14, 2008 at 12:10:27AM +1000, Dave Chinner wrote: > + * we need to provide an empty inode free function to prevent > + * the generic code from trying to free ouuur combined inode. ^^^^ spelling? > - > -STATIC void > -xfs_fs_inode_init_once( > - void *vnode) > + struct inode *inode) > { > - inode_init_once((struct inode *)vnode); > + return; > } No need for a no-argument return at the end of the function. > static inline int xfs_icount(struct xfs_inode *ip) > { > - struct inode *inode = VFS_I(ip); > - > - if (!inode) > - return atomic_read(&inode->i_count); > - return -1; > + return atomic_read(&VFS_I(ip)->i_count); > } At this point we can just kill this helper - there's only one caller anyway. > - if (xfs_iflush(ip, sync_mode) == 0) { > + if (!VN_BAD(VFS_I(ip)) && xfs_iflush(ip, sync_mode) == 0) { Why don't you switch to is_bad_inode directly instead of fixing this up in a later patch?