aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--fs/btrfs/compression.c42
-rw-r--r--fs/btrfs/compression.h2
-rw-r--r--fs/btrfs/ctree.h2
-rw-r--r--fs/btrfs/disk-io.c2
-rw-r--r--fs/btrfs/extent_io.c28
-rw-r--r--fs/btrfs/extent_io.h2
-rw-r--r--fs/btrfs/inode.c24
-rw-r--r--fs/btrfs/super.c4
8 files changed, 53 insertions, 53 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 41d1d7c70e29..d4cd0f0cd695 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -332,7 +332,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
332 struct compressed_bio *cb; 332 struct compressed_bio *cb;
333 unsigned long bytes_left; 333 unsigned long bytes_left;
334 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; 334 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
335 int page_index = 0; 335 int pg_index = 0;
336 struct page *page; 336 struct page *page;
337 u64 first_byte = disk_start; 337 u64 first_byte = disk_start;
338 struct block_device *bdev; 338 struct block_device *bdev;
@@ -366,8 +366,8 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
366 366
367 /* create and submit bios for the compressed pages */ 367 /* create and submit bios for the compressed pages */
368 bytes_left = compressed_len; 368 bytes_left = compressed_len;
369 for (page_index = 0; page_index < cb->nr_pages; page_index++) { 369 for (pg_index = 0; pg_index < cb->nr_pages; pg_index++) {
370 page = compressed_pages[page_index]; 370 page = compressed_pages[pg_index];
371 page->mapping = inode->i_mapping; 371 page->mapping = inode->i_mapping;
372 if (bio->bi_size) 372 if (bio->bi_size)
373 ret = io_tree->ops->merge_bio_hook(page, 0, 373 ret = io_tree->ops->merge_bio_hook(page, 0,
@@ -432,7 +432,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
432 struct compressed_bio *cb) 432 struct compressed_bio *cb)
433{ 433{
434 unsigned long end_index; 434 unsigned long end_index;
435 unsigned long page_index; 435 unsigned long pg_index;
436 u64 last_offset; 436 u64 last_offset;
437 u64 isize = i_size_read(inode); 437 u64 isize = i_size_read(inode);
438 int ret; 438 int ret;
@@ -456,13 +456,13 @@ static noinline int add_ra_bio_pages(struct inode *inode,
456 end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; 456 end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
457 457
458 while (last_offset < compressed_end) { 458 while (last_offset < compressed_end) {
459 page_index = last_offset >> PAGE_CACHE_SHIFT; 459 pg_index = last_offset >> PAGE_CACHE_SHIFT;
460 460
461 if (page_index > end_index) 461 if (pg_index > end_index)
462 break; 462 break;
463 463
464 rcu_read_lock(); 464 rcu_read_lock();
465 page = radix_tree_lookup(&mapping->page_tree, page_index); 465 page = radix_tree_lookup(&mapping->page_tree, pg_index);
466 rcu_read_unlock(); 466 rcu_read_unlock();
467 if (page) { 467 if (page) {
468 misses++; 468 misses++;
@@ -476,7 +476,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
476 if (!page) 476 if (!page)
477 break; 477 break;
478 478
479 if (add_to_page_cache_lru(page, mapping, page_index, 479 if (add_to_page_cache_lru(page, mapping, pg_index,
480 GFP_NOFS)) { 480 GFP_NOFS)) {
481 page_cache_release(page); 481 page_cache_release(page);
482 goto next; 482 goto next;
@@ -560,7 +560,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
560 unsigned long uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE; 560 unsigned long uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
561 unsigned long compressed_len; 561 unsigned long compressed_len;
562 unsigned long nr_pages; 562 unsigned long nr_pages;
563 unsigned long page_index; 563 unsigned long pg_index;
564 struct page *page; 564 struct page *page;
565 struct block_device *bdev; 565 struct block_device *bdev;
566 struct bio *comp_bio; 566 struct bio *comp_bio;
@@ -613,10 +613,10 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
613 613
614 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; 614 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev;
615 615
616 for (page_index = 0; page_index < nr_pages; page_index++) { 616 for (pg_index = 0; pg_index < nr_pages; pg_index++) {
617 cb->compressed_pages[page_index] = alloc_page(GFP_NOFS | 617 cb->compressed_pages[pg_index] = alloc_page(GFP_NOFS |
618 __GFP_HIGHMEM); 618 __GFP_HIGHMEM);
619 if (!cb->compressed_pages[page_index]) 619 if (!cb->compressed_pages[pg_index])
620 goto fail2; 620 goto fail2;
621 } 621 }
622 cb->nr_pages = nr_pages; 622 cb->nr_pages = nr_pages;
@@ -634,8 +634,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
634 comp_bio->bi_end_io = end_compressed_bio_read; 634 comp_bio->bi_end_io = end_compressed_bio_read;
635 atomic_inc(&cb->pending_bios); 635 atomic_inc(&cb->pending_bios);
636 636
637 for (page_index = 0; page_index < nr_pages; page_index++) { 637 for (pg_index = 0; pg_index < nr_pages; pg_index++) {
638 page = cb->compressed_pages[page_index]; 638 page = cb->compressed_pages[pg_index];
639 page->mapping = inode->i_mapping; 639 page->mapping = inode->i_mapping;
640 page->index = em_start >> PAGE_CACHE_SHIFT; 640 page->index = em_start >> PAGE_CACHE_SHIFT;
641 641
@@ -702,8 +702,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
702 return 0; 702 return 0;
703 703
704fail2: 704fail2:
705 for (page_index = 0; page_index < nr_pages; page_index++) 705 for (pg_index = 0; pg_index < nr_pages; pg_index++)
706 free_page((unsigned long)cb->compressed_pages[page_index]); 706 free_page((unsigned long)cb->compressed_pages[pg_index]);
707 707
708 kfree(cb->compressed_pages); 708 kfree(cb->compressed_pages);
709fail1: 709fail1:
@@ -945,7 +945,7 @@ void btrfs_exit_compress(void)
945int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, 945int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
946 unsigned long total_out, u64 disk_start, 946 unsigned long total_out, u64 disk_start,
947 struct bio_vec *bvec, int vcnt, 947 struct bio_vec *bvec, int vcnt,
948 unsigned long *page_index, 948 unsigned long *pg_index,
949 unsigned long *pg_offset) 949 unsigned long *pg_offset)
950{ 950{
951 unsigned long buf_offset; 951 unsigned long buf_offset;
@@ -954,7 +954,7 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
954 unsigned long working_bytes = total_out - buf_start; 954 unsigned long working_bytes = total_out - buf_start;
955 unsigned long bytes; 955 unsigned long bytes;
956 char *kaddr; 956 char *kaddr;
957 struct page *page_out = bvec[*page_index].bv_page; 957 struct page *page_out = bvec[*pg_index].bv_page;
958 958
959 /* 959 /*
960 * start byte is the first byte of the page we're currently 960 * start byte is the first byte of the page we're currently
@@ -995,11 +995,11 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
995 995
996 /* check if we need to pick another page */ 996 /* check if we need to pick another page */
997 if (*pg_offset == PAGE_CACHE_SIZE) { 997 if (*pg_offset == PAGE_CACHE_SIZE) {
998 (*page_index)++; 998 (*pg_index)++;
999 if (*page_index >= vcnt) 999 if (*pg_index >= vcnt)
1000 return 0; 1000 return 0;
1001 1001
1002 page_out = bvec[*page_index].bv_page; 1002 page_out = bvec[*pg_index].bv_page;
1003 *pg_offset = 0; 1003 *pg_offset = 0;
1004 start_byte = page_offset(page_out) - disk_start; 1004 start_byte = page_offset(page_out) - disk_start;
1005 1005
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h
index 51000174b9d7..a12059f4f0fd 100644
--- a/fs/btrfs/compression.h
+++ b/fs/btrfs/compression.h
@@ -37,7 +37,7 @@ int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page,
37int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, 37int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
38 unsigned long total_out, u64 disk_start, 38 unsigned long total_out, u64 disk_start,
39 struct bio_vec *bvec, int vcnt, 39 struct bio_vec *bvec, int vcnt,
40 unsigned long *page_index, 40 unsigned long *pg_index,
41 unsigned long *pg_offset); 41 unsigned long *pg_offset);
42 42
43int btrfs_submit_compressed_write(struct inode *inode, u64 start, 43int btrfs_submit_compressed_write(struct inode *inode, u64 start,
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8f4b81de3ae2..b5433bbe7516 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2534,7 +2534,7 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
2534int btrfs_commit_write(struct file *file, struct page *page, 2534int btrfs_commit_write(struct file *file, struct page *page,
2535 unsigned from, unsigned to); 2535 unsigned from, unsigned to);
2536struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page, 2536struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
2537 size_t page_offset, u64 start, u64 end, 2537 size_t pg_offset, u64 start, u64 end,
2538 int create); 2538 int create);
2539int btrfs_update_inode(struct btrfs_trans_handle *trans, 2539int btrfs_update_inode(struct btrfs_trans_handle *trans,
2540 struct btrfs_root *root, 2540 struct btrfs_root *root,
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 228cf36ece83..990afa8656a2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -137,7 +137,7 @@ static const char *btrfs_eb_name[BTRFS_MAX_LEVEL + 1] = {
137 * that covers the entire device 137 * that covers the entire device
138 */ 138 */
139static struct extent_map *btree_get_extent(struct inode *inode, 139static struct extent_map *btree_get_extent(struct inode *inode,
140 struct page *page, size_t page_offset, u64 start, u64 len, 140 struct page *page, size_t pg_offset, u64 start, u64 len,
141 int create) 141 int create)
142{ 142{
143 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; 143 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
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) {
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index af2d7179c372..b9ce2f720742 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -164,7 +164,7 @@ static inline struct extent_state *extent_state_next(struct extent_state *state)
164 164
165typedef struct extent_map *(get_extent_t)(struct inode *inode, 165typedef struct extent_map *(get_extent_t)(struct inode *inode,
166 struct page *page, 166 struct page *page,
167 size_t page_offset, 167 size_t pg_offset,
168 u64 start, u64 len, 168 u64 start, u64 len,
169 int create); 169 int create);
170 170
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7cd8ab0ef04d..fc966472e3ad 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6985,7 +6985,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
6985 struct btrfs_trans_handle *trans; 6985 struct btrfs_trans_handle *trans;
6986 struct btrfs_root *root = BTRFS_I(old_dir)->root; 6986 struct btrfs_root *root = BTRFS_I(old_dir)->root;
6987 struct btrfs_root *dest = BTRFS_I(new_dir)->root; 6987 struct btrfs_root *dest = BTRFS_I(new_dir)->root;
6988 struct inode *new_inode = new_dentry->d_inode; 6988 struct inode *newinode = new_dentry->d_inode;
6989 struct inode *old_inode = old_dentry->d_inode; 6989 struct inode *old_inode = old_dentry->d_inode;
6990 struct timespec ctime = CURRENT_TIME; 6990 struct timespec ctime = CURRENT_TIME;
6991 u64 index = 0; 6991 u64 index = 0;
@@ -7000,18 +7000,18 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
7000 return -EXDEV; 7000 return -EXDEV;
7001 7001
7002 if (old_inode->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID || 7002 if (old_inode->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID ||
7003 (new_inode && new_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID)) 7003 (newinode && newinode->i_ino == BTRFS_FIRST_FREE_OBJECTID))
7004 return -ENOTEMPTY; 7004 return -ENOTEMPTY;
7005 7005
7006 if (S_ISDIR(old_inode->i_mode) && new_inode && 7006 if (S_ISDIR(old_inode->i_mode) && newinode &&
7007 new_inode->i_size > BTRFS_EMPTY_DIR_SIZE) 7007 newinode->i_size > BTRFS_EMPTY_DIR_SIZE)
7008 return -ENOTEMPTY; 7008 return -ENOTEMPTY;
7009 /* 7009 /*
7010 * we're using rename to replace one file with another. 7010 * we're using rename to replace one file with another.
7011 * and the replacement file is large. Start IO on it now so 7011 * and the replacement file is large. Start IO on it now so
7012 * we don't add too much work to the end of the transaction 7012 * we don't add too much work to the end of the transaction
7013 */ 7013 */
7014 if (new_inode && S_ISREG(old_inode->i_mode) && new_inode->i_size && 7014 if (newinode && S_ISREG(old_inode->i_mode) && newinode->i_size &&
7015 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) 7015 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
7016 filemap_flush(old_inode->i_mapping); 7016 filemap_flush(old_inode->i_mapping);
7017 7017
@@ -7065,7 +7065,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
7065 * make sure the inode gets flushed if it is replacing 7065 * make sure the inode gets flushed if it is replacing
7066 * something. 7066 * something.
7067 */ 7067 */
7068 if (new_inode && new_inode->i_size && 7068 if (newinode && newinode->i_size &&
7069 old_inode && S_ISREG(old_inode->i_mode)) { 7069 old_inode && S_ISREG(old_inode->i_mode)) {
7070 btrfs_add_ordered_operation(trans, root, old_inode); 7070 btrfs_add_ordered_operation(trans, root, old_inode);
7071 } 7071 }
@@ -7092,16 +7092,16 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
7092 } 7092 }
7093 BUG_ON(ret); 7093 BUG_ON(ret);
7094 7094
7095 if (new_inode) { 7095 if (newinode) {
7096 new_inode->i_ctime = CURRENT_TIME; 7096 newinode->i_ctime = CURRENT_TIME;
7097 if (unlikely(new_inode->i_ino == 7097 if (unlikely(newinode->i_ino ==
7098 BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) { 7098 BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
7099 root_objectid = BTRFS_I(new_inode)->location.objectid; 7099 root_objectid = BTRFS_I(newinode)->location.objectid;
7100 ret = btrfs_unlink_subvol(trans, dest, new_dir, 7100 ret = btrfs_unlink_subvol(trans, dest, new_dir,
7101 root_objectid, 7101 root_objectid,
7102 new_dentry->d_name.name, 7102 new_dentry->d_name.name,
7103 new_dentry->d_name.len); 7103 new_dentry->d_name.len);
7104 BUG_ON(new_inode->i_nlink == 0); 7104 BUG_ON(newinode->i_nlink == 0);
7105 } else { 7105 } else {
7106 ret = btrfs_unlink_inode(trans, dest, new_dir, 7106 ret = btrfs_unlink_inode(trans, dest, new_dir,
7107 new_dentry->d_inode, 7107 new_dentry->d_inode,
@@ -7109,7 +7109,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
7109 new_dentry->d_name.len); 7109 new_dentry->d_name.len);
7110 } 7110 }
7111 BUG_ON(ret); 7111 BUG_ON(ret);
7112 if (new_inode->i_nlink == 0) { 7112 if (newinode->i_nlink == 0) {
7113 ret = btrfs_orphan_add(trans, new_dentry->d_inode); 7113 ret = btrfs_orphan_add(trans, new_dentry->d_inode);
7114 BUG_ON(ret); 7114 BUG_ON(ret);
7115 } 7115 }
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 0ac712efcdf2..3e28521643fb 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -739,7 +739,7 @@ static int btrfs_set_super(struct super_block *s, void *data)
739 * for multiple device setup. Make sure to keep it in sync. 739 * for multiple device setup. Make sure to keep it in sync.
740 */ 740 */
741static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, 741static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
742 const char *dev_name, void *data) 742 const char *device_name, void *data)
743{ 743{
744 struct block_device *bdev = NULL; 744 struct block_device *bdev = NULL;
745 struct super_block *s; 745 struct super_block *s;
@@ -762,7 +762,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
762 if (error) 762 if (error)
763 return ERR_PTR(error); 763 return ERR_PTR(error);
764 764
765 error = btrfs_scan_one_device(dev_name, mode, fs_type, &fs_devices); 765 error = btrfs_scan_one_device(device_name, mode, fs_type, &fs_devices);
766 if (error) 766 if (error)
767 goto error_free_subvol_name; 767 goto error_free_subvol_name;
768 768