xfs
[Top] [All Lists]

Re: [PATCH 2/4] xfs: remove xfs_wait_on_pages()

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/4] xfs: remove xfs_wait_on_pages()
From: Andrew Dahl <adahl@xxxxxxx>
Date: Mon, 12 Nov 2012 14:44:07 -0600
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <1352455804-17045-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1352455804-17045-1-git-send-email-david@xxxxxxxxxxxxx> <1352455804-17045-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2
On 11/09/2012 04:10 AM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> It's just a simple wrapper around a VFS function that is only called
> by another function in xfs_fs_subr.c. Remove it and call the VFS
> function directly.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_fs_subr.c  |   18 ++----------------
>  fs/xfs/xfs_vnodeops.h |    1 -
>  2 files changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/fs/xfs/xfs_fs_subr.c b/fs/xfs/xfs_fs_subr.c
> index d49de3d..3365823 100644
> --- a/fs/xfs/xfs_fs_subr.c
> +++ b/fs/xfs/xfs_fs_subr.c
> @@ -62,23 +62,9 @@ xfs_flush_pages(
>                               last == -1 ? LLONG_MAX : last);
>       if (flags & XBF_ASYNC)
>               return ret;
> -     ret2 = xfs_wait_on_pages(ip, first, last);
> +     ret2 = -filemap_fdatawait_range(mapping, first,
> +                             last == -1 ? XFS_ISIZE(ip) - 1 : last);
>       if (!ret)
>               ret = ret2;
>       return ret;
>  }
> -
> -int
> -xfs_wait_on_pages(
> -     xfs_inode_t     *ip,
> -     xfs_off_t       first,
> -     xfs_off_t       last)
> -{
> -     struct address_space *mapping = VFS_I(ip)->i_mapping;
> -
> -     if (mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK)) {
> -             return -filemap_fdatawait_range(mapping, first,
> -                                     last == -1 ? XFS_ISIZE(ip) - 1 : last);
> -     }
> -     return 0;
> -}
> diff --git a/fs/xfs/xfs_vnodeops.h b/fs/xfs/xfs_vnodeops.h
> index d48141d..c8ad48b 100644
> --- a/fs/xfs/xfs_vnodeops.h
> +++ b/fs/xfs/xfs_vnodeops.h
> @@ -52,7 +52,6 @@ int xfs_flushinval_pages(struct xfs_inode *ip, xfs_off_t 
> first,
>               xfs_off_t last, int fiopt);
>  int xfs_flush_pages(struct xfs_inode *ip, xfs_off_t first,
>               xfs_off_t last, uint64_t flags, int fiopt);
> -int xfs_wait_on_pages(struct xfs_inode *ip, xfs_off_t first, xfs_off_t last);
>  
>  int xfs_zero_eof(struct xfs_inode *, xfs_off_t, xfs_fsize_t);
>  int xfs_free_eofblocks(struct xfs_mount *, struct xfs_inode *, bool);
> 

Looks good!

Reviewed-by: Andrew Dahl <adahl@xxxxxxx>

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