aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-04-19 08:29:38 -0400
committerDavid Sterba <dsterba@suse.cz>2011-05-02 07:57:19 -0400
commit306e16ce13c0f3d4fc071b45803b5b83c2606011 (patch)
tree109aa42ae17d91429d11ab332e0c16e790f95dc5 /fs/btrfs/extent_io.c
parent3fd9952df4964fac7d5868ba48eadcc9dae3ba46 (diff)
btrfs: rename variables clashing with global function names
reported by gcc -Wshadow: page_index, page_offset, new_inode, dev_name Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index ba41da59e31b..b730c12fa958 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2007,7 +2007,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2007 struct btrfs_ordered_extent *ordered; 2007 struct btrfs_ordered_extent *ordered;
2008 int ret; 2008 int ret;
2009 int nr = 0; 2009 int nr = 0;
2010 size_t page_offset = 0; 2010 size_t pg_offset = 0;
2011 size_t iosize; 2011 size_t iosize;
2012 size_t disk_io_size; 2012 size_t disk_io_size;
2013 size_t blocksize = inode->i_sb->s_blocksize; 2013 size_t blocksize = inode->i_sb->s_blocksize;
@@ -2043,9 +2043,9 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2043 char *userpage; 2043 char *userpage;
2044 struct extent_state *cached = NULL; 2044 struct extent_state *cached = NULL;
2045 2045
2046 iosize = PAGE_CACHE_SIZE - page_offset; 2046 iosize = PAGE_CACHE_SIZE - pg_offset;
2047 userpage = kmap_atomic(page, KM_USER0); 2047 userpage = kmap_atomic(page, KM_USER0);
2048 memset(userpage + page_offset, 0, iosize); 2048 memset(userpage + pg_offset, 0, iosize);
2049 flush_dcache_page(page); 2049 flush_dcache_page(page);
2050 kunmap_atomic(userpage, KM_USER0); 2050 kunmap_atomic(userpage, KM_USER0);
2051 set_extent_uptodate(tree, cur, cur + iosize - 1, 2051 set_extent_uptodate(tree, cur, cur + iosize - 1,
@@ -2054,7 +2054,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2054 &cached, GFP_NOFS); 2054 &cached, GFP_NOFS);
2055 break; 2055 break;
2056 } 2056 }
2057 em = get_extent(inode, page, page_offset, cur, 2057 em = get_extent(inode, page, pg_offset, cur,
2058 end - cur + 1, 0); 2058 end - cur + 1, 0);
2059 if (IS_ERR(em) || !em) { 2059 if (IS_ERR(em) || !em) {
2060 SetPageError(page); 2060 SetPageError(page);
@@ -2094,7 +2094,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2094 struct extent_state *cached = NULL; 2094 struct extent_state *cached = NULL;
2095 2095
2096 userpage = kmap_atomic(page, KM_USER0); 2096 userpage = kmap_atomic(page, KM_USER0);
2097 memset(userpage + page_offset, 0, iosize); 2097 memset(userpage + pg_offset, 0, iosize);
2098 flush_dcache_page(page); 2098 flush_dcache_page(page);
2099 kunmap_atomic(userpage, KM_USER0); 2099 kunmap_atomic(userpage, KM_USER0);
2100 2100
@@ -2103,7 +2103,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2103 unlock_extent_cached(tree, cur, cur + iosize - 1, 2103 unlock_extent_cached(tree, cur, cur + iosize - 1,
2104 &cached, GFP_NOFS); 2104 &cached, GFP_NOFS);
2105 cur = cur + iosize; 2105 cur = cur + iosize;
2106 page_offset += iosize; 2106 pg_offset += iosize;
2107 continue; 2107 continue;
2108 } 2108 }
2109 /* the get_extent function already copied into the page */ 2109 /* the get_extent function already copied into the page */
@@ -2112,7 +2112,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2112 check_page_uptodate(tree, page); 2112 check_page_uptodate(tree, page);
2113 unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); 2113 unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
2114 cur = cur + iosize; 2114 cur = cur + iosize;
2115 page_offset += iosize; 2115 pg_offset += iosize;
2116 continue; 2116 continue;
2117 } 2117 }
2118 /* we have an inline extent but it didn't get marked up 2118 /* we have an inline extent but it didn't get marked up
@@ -2122,7 +2122,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2122 SetPageError(page); 2122 SetPageError(page);
2123 unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); 2123 unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
2124 cur = cur + iosize; 2124 cur = cur + iosize;
2125 page_offset += iosize; 2125 pg_offset += iosize;
2126 continue; 2126 continue;
2127 } 2127 }
2128 2128
@@ -2135,7 +2135,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2135 unsigned long pnr = (last_byte >> PAGE_CACHE_SHIFT) + 1; 2135 unsigned long pnr = (last_byte >> PAGE_CACHE_SHIFT) + 1;
2136 pnr -= page->index; 2136 pnr -= page->index;
2137 ret = submit_extent_page(READ, tree, page, 2137 ret = submit_extent_page(READ, tree, page,
2138 sector, disk_io_size, page_offset, 2138 sector, disk_io_size, pg_offset,
2139 bdev, bio, pnr, 2139 bdev, bio, pnr,
2140 end_bio_extent_readpage, mirror_num, 2140 end_bio_extent_readpage, mirror_num,
2141 *bio_flags, 2141 *bio_flags,
@@ -2146,7 +2146,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2146 if (ret) 2146 if (ret)
2147 SetPageError(page); 2147 SetPageError(page);
2148 cur = cur + iosize; 2148 cur = cur + iosize;
2149 page_offset += iosize; 2149 pg_offset += iosize;
2150 } 2150 }
2151 if (!nr) { 2151 if (!nr) {
2152 if (!PageError(page)) 2152 if (!PageError(page))
@@ -2751,7 +2751,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
2751 u64 cur_end; 2751 u64 cur_end;
2752 struct extent_map *em; 2752 struct extent_map *em;
2753 unsigned blocksize = 1 << inode->i_blkbits; 2753 unsigned blocksize = 1 << inode->i_blkbits;
2754 size_t page_offset = 0; 2754 size_t pg_offset = 0;
2755 size_t block_off_start; 2755 size_t block_off_start;
2756 size_t block_off_end; 2756 size_t block_off_end;
2757 int err = 0; 2757 int err = 0;
@@ -2767,7 +2767,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
2767 2767
2768 lock_extent(tree, page_start, page_end, GFP_NOFS); 2768 lock_extent(tree, page_start, page_end, GFP_NOFS);
2769 while (block_start <= block_end) { 2769 while (block_start <= block_end) {
2770 em = get_extent(inode, page, page_offset, block_start, 2770 em = get_extent(inode, page, pg_offset, block_start,
2771 block_end - block_start + 1, 1); 2771 block_end - block_start + 1, 1);
2772 if (IS_ERR(em) || !em) 2772 if (IS_ERR(em) || !em)
2773 goto err; 2773 goto err;
@@ -2811,7 +2811,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
2811 block_start + iosize - 1, 2811 block_start + iosize - 1,
2812 EXTENT_LOCKED, 0, NULL, NULL, GFP_NOFS); 2812 EXTENT_LOCKED, 0, NULL, NULL, GFP_NOFS);
2813 ret = submit_extent_page(READ, tree, page, 2813 ret = submit_extent_page(READ, tree, page,
2814 sector, iosize, page_offset, em->bdev, 2814 sector, iosize, pg_offset, em->bdev,
2815 NULL, 1, 2815 NULL, 1,
2816 end_bio_extent_preparewrite, 0, 2816 end_bio_extent_preparewrite, 0,
2817 0, 0); 2817 0, 0);
@@ -2828,7 +2828,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
2828 &cached, GFP_NOFS); 2828 &cached, GFP_NOFS);
2829 block_start = cur_end + 1; 2829 block_start = cur_end + 1;
2830 } 2830 }
2831 page_offset = block_start & (PAGE_CACHE_SIZE - 1); 2831 pg_offset = block_start & (PAGE_CACHE_SIZE - 1);
2832 free_extent_map(em); 2832 free_extent_map(em);
2833 } 2833 }
2834 if (iocount) { 2834 if (iocount) {