xfs
[Top] [All Lists]

Re: [PATCH 3/5] xfs: remove confusing ail cursor wrapper

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/5] xfs: remove confusing ail cursor wrapper
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 4 Jul 2011 04:16:03 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1309757260-5484-4-git-send-email-david@xxxxxxxxxxxxx>
References: <1309757260-5484-1-git-send-email-david@xxxxxxxxxxxxx> <1309757260-5484-4-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jul 04, 2011 at 03:27:38PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> xfs_trans_ail_cursor_set() doesn't set the cursor to the current log
> item, it sets it to the next item. There is already a function for
> doing this - xfs_trans_ail_cursor_next() - and the _set function is
> simply a two line wrapper.  Remove it and open code the setting of
> the cursor in the two locations that call it to remove the
> confusion.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_trans_ail.c |   38 ++++++++++++--------------------------
>  1 files changed, 12 insertions(+), 26 deletions(-)

> @@ -295,14 +283,11 @@ xfs_trans_ail_cursor_first(
>       }
>       lip = NULL;
>  out:
> -     xfs_trans_ail_cursor_set(ailp, cur, lip);
> +     if (lip)
> +             cur->item = xfs_ail_next(ailp, lip);
>       return lip;

The lip = NULL above could nbe turned into a direct return NULL;

Otherwise looks good,


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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