[PATCH 10/12] making the kernel -Wshadow clean - mm/truncate.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix -Wshadow warnings in mm/truncate.c


Signed-off-by: Jesper Juhl <[email protected]>
---

 mm/truncate.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

--- linux-2.6.18-rc2-git7-orig/mm/truncate.c	2006-07-29 14:57:27.000000000 +0200
+++ linux-2.6.18-rc2-git7/mm/truncate.c	2006-07-30 06:48:27.000000000 +0200
@@ -127,15 +127,15 @@ void truncate_inode_pages_range(struct a
 	       pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
 		for (i = 0; i < pagevec_count(&pvec); i++) {
 			struct page *page = pvec.pages[i];
-			pgoff_t page_index = page->index;
+			pgoff_t page_idx = page->index;
 
-			if (page_index > end) {
-				next = page_index;
+			if (page_idx > end) {
+				next = page_idx;
 				break;
 			}
 
-			if (page_index > next)
-				next = page_index;
+			if (page_idx > next)
+				next = page_idx;
 			next++;
 			if (TestSetPageLocked(page))
 				continue;
@@ -298,7 +298,7 @@ int invalidate_inode_pages2_range(struct
 			min(end - next, (pgoff_t)PAGEVEC_SIZE - 1) + 1)) {
 		for (i = 0; !ret && i < pagevec_count(&pvec); i++) {
 			struct page *page = pvec.pages[i];
-			pgoff_t page_index;
+			pgoff_t page_idx;
 			int was_dirty;
 
 			lock_page(page);
@@ -306,11 +306,11 @@ int invalidate_inode_pages2_range(struct
 				unlock_page(page);
 				continue;
 			}
-			page_index = page->index;
-			next = page_index + 1;
+			page_idx = page->index;
+			next = page_idx + 1;
 			if (next == 0)
 				wrapped = 1;
-			if (page_index > end) {
+			if (page_idx > end) {
 				unlock_page(page);
 				break;
 			}
@@ -321,8 +321,8 @@ int invalidate_inode_pages2_range(struct
 					 * Zap the rest of the file in one hit.
 					 */
 					unmap_mapping_range(mapping,
-					   (loff_t)page_index<<PAGE_CACHE_SHIFT,
-					   (loff_t)(end - page_index + 1)
+					   (loff_t)page_idx<<PAGE_CACHE_SHIFT,
+					   (loff_t)(end - page_idx + 1)
 							<< PAGE_CACHE_SHIFT,
 					    0);
 					did_range_unmap = 1;
@@ -331,7 +331,7 @@ int invalidate_inode_pages2_range(struct
 					 * Just zap this page
 					 */
 					unmap_mapping_range(mapping,
-					  (loff_t)page_index<<PAGE_CACHE_SHIFT,
+					  (loff_t)page_idx<<PAGE_CACHE_SHIFT,
 					  PAGE_CACHE_SIZE, 0);
 				}
 			}



-
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]
  Powered by Linux