xfs
[Top] [All Lists]

Re: [PATCH 3/4] xfs: simplify xfs_ail_max

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: [PATCH 3/4] xfs: simplify xfs_ail_max
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 26 Dec 2013 02:07:21 -0800
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <52B9829A.10804@xxxxxxxxxx>
References: <52B9829A.10804@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Dec 24, 2013 at 08:48:26PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@xxxxxxxxxx>
> 
> We have already simplified xfs_ail_min() with a new list helper, i.e,
> list_first_entry_or_null(), but xfs_ail_max() still remains as same
> as there is no corresponding list helper we can use for now.  It's
> fairly easy to simulate the list behavior of getting the last item
> in the AIL, therefore we can simplify xfs_ail_max() and move it to
> the header file to make this pair of AIL routines looks symmetrical.

The usageof list_last_entry is fine with me, as is making it inline.
But I think using the explicit if is a lot more readable than the ? :
expression.

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