This patch changes the variable 'i' in
fs/mpage.c::__mpage_writepages from 'unsigned int' to int.
The only use of 'i' is in the for loop, and the array being indexed is
PAGEVEC_SIZE in size (and with PAGEVEC_SIZE being 14, an int is fully
sufficient) and in the loop itself 'i' is being compared to 'nr_pages'
which is defined as 'int' at the top of the function. So, as far as I can
see changing 'i' to int makes sense - it is more than large enough for
what it's used for, it then matches the type it is compared against
exactely and it avoids a signed vs unsigned comparison.
Signed-off-by: Jesper Juhl <[email protected]>
--- linux-2.6.12-rc2-mm3-orig/fs/mpage.c 2005-04-11 21:20:50.000000000 +0200
+++ linux-2.6.12-rc2-mm3/fs/mpage.c 2005-04-24 01:28:53.000000000 +0200
@@ -676,7 +676,7 @@ retry:
(nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
PAGECACHE_TAG_DIRTY,
min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
- unsigned i;
+ int i;
scanned = 1;
for (i = 0; i < nr_pages; i++) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]