[PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents()
Christoph Hellwig
hch at infradead.org
Sat Sep 26 12:04:23 CDT 2009
On Fri, Sep 25, 2009 at 02:42:26PM -0500, Eric Sandeen wrote:
> V2: use min() as suggested by Jeff, it's tidier.
I disagree with that, with the cast it looks pretty horrible.
At least use min_t to avoid the case, but what's wrong with:
> + /* bufsize may have just been a guess; don't go negative */
> + bufsize = min((bufsize - length), (size_t)0);
bufsize = bufsize - length > 0 ? bufsize - length : 0;
Anyway, takes this as a
Reviewed-by: Christoph Hellwig <hch at lst.de>
for any variant.
More information about the xfs
mailing list