From: yangsheng Date: Tue, 6 Apr 2010 15:37:21 +0000 (+0800) Subject: b=22385 Computing result of unsigned variable may < 0. X-Git-Tag: 1.8.3~11 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=536e1116989e865b7e53a8d4a9b93dec3ae5b6ca;p=fs%2Flustre-release.git b=22385 Computing result of unsigned variable may < 0. i=johann i=wangdi --- diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 8c49a03..f42419e 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -1629,7 +1629,8 @@ static int ras_inside_ra_window(unsigned long idx, struct ra_io_arg *ria) * For stride I/O mode, just check whether the idx is inside * the ria_pages. */ return ria->ria_length == 0 || ria->ria_length == ria->ria_pages || - (idx - ria->ria_stoff) % ria->ria_length < ria->ria_pages; + (idx >= ria->ria_stoff && (idx - ria->ria_stoff) % + ria->ria_length < ria->ria_pages); } static int ll_read_ahead_pages(struct obd_export *exp,