| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents() |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sat, 26 Sep 2009 13:04:23 -0400 |
| Cc: | xfs mailing list <xfs@xxxxxxxxxxx>, tobias@xxxxxxxxxxxxxxx |
| In-reply-to: | <4ABD1D22.2030002@xxxxxxxxxxx> |
| References: | <4ABA5192.80509@xxxxxxxxxxx> <4ABD1D22.2030002@xxxxxxxxxxx> |
| User-agent: | Mutt/1.5.19 (2009-01-05) |
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@xxxxxx>
for any variant.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: mmap vs mtime in 2.6.26 and up, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents(), Eric Sandeen |
| Previous by Thread: | [PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents(), Eric Sandeen |
| Next by Thread: | Re: [PATCH V2] fix readahead calculations in xfs_dir2_leaf_getdents(), Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |