From: phil Date: Tue, 17 May 2005 16:25:58 +0000 (+0000) Subject: lsy reported that LL_CDEBUG_PAGE in osc_checksum_bulk wouldn't compile, X-Git-Tag: v1_7_100~1^25~8^2~117 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f1be00917521f1772a62b5c37d8f478840c95613;p=fs%2Flustre-release.git lsy reported that LL_CDEBUG_PAGE in osc_checksum_bulk wouldn't compile, because the outer scope defines a variable "page_count", and LL_CDEBUG_PAGE wants to call the VM function page_count(). I still can't figure out why it works fine for me, but I've stopped trying. Changing the name of the variable is easier. --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index b45fd27..217aca1 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -718,13 +718,13 @@ static inline int can_merge_pages(struct brw_page *p1, struct brw_page *p2) return (p1->off + p1->count == p2->off); } -static obd_count osc_checksum_bulk(int nob, obd_count page_count, +static obd_count osc_checksum_bulk(int nob, obd_count pg_count, struct brw_page *pga) { __u32 cksum = ~0; - LASSERT (page_count > 0); - while (nob > 0 && page_count > 0) { + LASSERT (pg_count > 0); + while (nob > 0 && pg_count > 0) { char *ptr = kmap(pga->pg); int off = pga->off & ~PAGE_MASK; int count = pga->count > nob ? nob : pga->count; @@ -735,7 +735,7 @@ static obd_count osc_checksum_bulk(int nob, obd_count page_count, off, cksum); nob -= pga->count; - page_count--; + pg_count--; pga++; }