xfs
[Top] [All Lists]

Re: [PATCH 3/3] XFS: Combine the XFS and Linux inodes V2

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/3] XFS: Combine the XFS and Linux inodes V2
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 14 Sep 2008 09:31:28 -0400
Cc: xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
In-reply-to: <1221315027-29951-4-git-send-email-david@xxxxxxxxxxxxx>
References: <1221315027-29951-1-git-send-email-david@xxxxxxxxxxxxx> <1221315027-29951-4-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
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?

<Prev in Thread] Current Thread [Next in Thread>