Commit 306e16ce authored by David Sterba's avatar David Sterba

btrfs: rename variables clashing with global function names

reported by gcc -Wshadow:
page_index, page_offset, new_inode, dev_name
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent 3fd9952d
...@@ -332,7 +332,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, ...@@ -332,7 +332,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
struct compressed_bio *cb; struct compressed_bio *cb;
unsigned long bytes_left; unsigned long bytes_left;
struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
int page_index = 0; int pg_index = 0;
struct page *page; struct page *page;
u64 first_byte = disk_start; u64 first_byte = disk_start;
struct block_device *bdev; struct block_device *bdev;
...@@ -366,8 +366,8 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, ...@@ -366,8 +366,8 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
/* create and submit bios for the compressed pages */ /* create and submit bios for the compressed pages */
bytes_left = compressed_len; bytes_left = compressed_len;
for (page_index = 0; page_index < cb->nr_pages; page_index++) { for (pg_index = 0; pg_index < cb->nr_pages; pg_index++) {
page = compressed_pages[page_index]; page = compressed_pages[pg_index];
page->mapping = inode->i_mapping; page->mapping = inode->i_mapping;
if (bio->bi_size) if (bio->bi_size)
ret = io_tree->ops->merge_bio_hook(page, 0, ret = io_tree->ops->merge_bio_hook(page, 0,
...@@ -432,7 +432,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, ...@@ -432,7 +432,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
struct compressed_bio *cb) struct compressed_bio *cb)
{ {
unsigned long end_index; unsigned long end_index;
unsigned long page_index; unsigned long pg_index;
u64 last_offset; u64 last_offset;
u64 isize = i_size_read(inode); u64 isize = i_size_read(inode);
int ret; int ret;
...@@ -456,13 +456,13 @@ static noinline int add_ra_bio_pages(struct inode *inode, ...@@ -456,13 +456,13 @@ static noinline int add_ra_bio_pages(struct inode *inode,
end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
while (last_offset < compressed_end) { while (last_offset < compressed_end) {
page_index = last_offset >> PAGE_CACHE_SHIFT; pg_index = last_offset >> PAGE_CACHE_SHIFT;
if (page_index > end_index) if (pg_index > end_index)
break; break;
rcu_read_lock(); rcu_read_lock();
page = radix_tree_lookup(&mapping->page_tree, page_index); page = radix_tree_lookup(&mapping->page_tree, pg_index);
rcu_read_unlock(); rcu_read_unlock();
if (page) { if (page) {
misses++; misses++;
...@@ -476,7 +476,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, ...@@ -476,7 +476,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
if (!page) if (!page)
break; break;
if (add_to_page_cache_lru(page, mapping, page_index, if (add_to_page_cache_lru(page, mapping, pg_index,
GFP_NOFS)) { GFP_NOFS)) {
page_cache_release(page); page_cache_release(page);
goto next; goto next;
...@@ -560,7 +560,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -560,7 +560,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
unsigned long uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE; unsigned long uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
unsigned long compressed_len; unsigned long compressed_len;
unsigned long nr_pages; unsigned long nr_pages;
unsigned long page_index; unsigned long pg_index;
struct page *page; struct page *page;
struct block_device *bdev; struct block_device *bdev;
struct bio *comp_bio; struct bio *comp_bio;
...@@ -613,10 +613,10 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -613,10 +613,10 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev;
for (page_index = 0; page_index < nr_pages; page_index++) { for (pg_index = 0; pg_index < nr_pages; pg_index++) {
cb->compressed_pages[page_index] = alloc_page(GFP_NOFS | cb->compressed_pages[pg_index] = alloc_page(GFP_NOFS |
__GFP_HIGHMEM); __GFP_HIGHMEM);
if (!cb->compressed_pages[page_index]) if (!cb->compressed_pages[pg_index])
goto fail2; goto fail2;
} }
cb->nr_pages = nr_pages; cb->nr_pages = nr_pages;
...@@ -634,8 +634,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -634,8 +634,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
comp_bio->bi_end_io = end_compressed_bio_read; comp_bio->bi_end_io = end_compressed_bio_read;
atomic_inc(&cb->pending_bios); atomic_inc(&cb->pending_bios);
for (page_index = 0; page_index < nr_pages; page_index++) { for (pg_index = 0; pg_index < nr_pages; pg_index++) {
page = cb->compressed_pages[page_index]; page = cb->compressed_pages[pg_index];
page->mapping = inode->i_mapping; page->mapping = inode->i_mapping;
page->index = em_start >> PAGE_CACHE_SHIFT; page->index = em_start >> PAGE_CACHE_SHIFT;
...@@ -702,8 +702,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -702,8 +702,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
return 0; return 0;
fail2: fail2:
for (page_index = 0; page_index < nr_pages; page_index++) for (pg_index = 0; pg_index < nr_pages; pg_index++)
free_page((unsigned long)cb->compressed_pages[page_index]); free_page((unsigned long)cb->compressed_pages[pg_index]);
kfree(cb->compressed_pages); kfree(cb->compressed_pages);
fail1: fail1:
...@@ -945,7 +945,7 @@ void btrfs_exit_compress(void) ...@@ -945,7 +945,7 @@ void btrfs_exit_compress(void)
int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
unsigned long total_out, u64 disk_start, unsigned long total_out, u64 disk_start,
struct bio_vec *bvec, int vcnt, struct bio_vec *bvec, int vcnt,
unsigned long *page_index, unsigned long *pg_index,
unsigned long *pg_offset) unsigned long *pg_offset)
{ {
unsigned long buf_offset; unsigned long buf_offset;
...@@ -954,7 +954,7 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, ...@@ -954,7 +954,7 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
unsigned long working_bytes = total_out - buf_start; unsigned long working_bytes = total_out - buf_start;
unsigned long bytes; unsigned long bytes;
char *kaddr; char *kaddr;
struct page *page_out = bvec[*page_index].bv_page; struct page *page_out = bvec[*pg_index].bv_page;
/* /*
* start byte is the first byte of the page we're currently * 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,11 +995,11 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
/* check if we need to pick another page */ /* check if we need to pick another page */
if (*pg_offset == PAGE_CACHE_SIZE) { if (*pg_offset == PAGE_CACHE_SIZE) {
(*page_index)++; (*pg_index)++;
if (*page_index >= vcnt) if (*pg_index >= vcnt)
return 0; return 0;
page_out = bvec[*page_index].bv_page; page_out = bvec[*pg_index].bv_page;
*pg_offset = 0; *pg_offset = 0;
start_byte = page_offset(page_out) - disk_start; start_byte = page_offset(page_out) - disk_start;
......
...@@ -37,7 +37,7 @@ int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page, ...@@ -37,7 +37,7 @@ int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page,
int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
unsigned long total_out, u64 disk_start, unsigned long total_out, u64 disk_start,
struct bio_vec *bvec, int vcnt, struct bio_vec *bvec, int vcnt,
unsigned long *page_index, unsigned long *pg_index,
unsigned long *pg_offset); unsigned long *pg_offset);
int btrfs_submit_compressed_write(struct inode *inode, u64 start, int btrfs_submit_compressed_write(struct inode *inode, u64 start,
......
...@@ -2534,7 +2534,7 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location, ...@@ -2534,7 +2534,7 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
int btrfs_commit_write(struct file *file, struct page *page, int btrfs_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to); unsigned from, unsigned to);
struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page, struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
size_t page_offset, u64 start, u64 end, size_t pg_offset, u64 start, u64 end,
int create); int create);
int btrfs_update_inode(struct btrfs_trans_handle *trans, int btrfs_update_inode(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_root *root,
......
...@@ -137,7 +137,7 @@ static const char *btrfs_eb_name[BTRFS_MAX_LEVEL + 1] = { ...@@ -137,7 +137,7 @@ static const char *btrfs_eb_name[BTRFS_MAX_LEVEL + 1] = {
* that covers the entire device * that covers the entire device
*/ */
static struct extent_map *btree_get_extent(struct inode *inode, static struct extent_map *btree_get_extent(struct inode *inode,
struct page *page, size_t page_offset, u64 start, u64 len, struct page *page, size_t pg_offset, u64 start, u64 len,
int create) int create)
{ {
struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
......
...@@ -2007,7 +2007,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2007,7 +2007,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
struct btrfs_ordered_extent *ordered; struct btrfs_ordered_extent *ordered;
int ret; int ret;
int nr = 0; int nr = 0;
size_t page_offset = 0; size_t pg_offset = 0;
size_t iosize; size_t iosize;
size_t disk_io_size; size_t disk_io_size;
size_t blocksize = inode->i_sb->s_blocksize; size_t blocksize = inode->i_sb->s_blocksize;
...@@ -2043,9 +2043,9 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2043,9 +2043,9 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
char *userpage; char *userpage;
struct extent_state *cached = NULL; struct extent_state *cached = NULL;
iosize = PAGE_CACHE_SIZE - page_offset; iosize = PAGE_CACHE_SIZE - pg_offset;
userpage = kmap_atomic(page, KM_USER0); userpage = kmap_atomic(page, KM_USER0);
memset(userpage + page_offset, 0, iosize); memset(userpage + pg_offset, 0, iosize);
flush_dcache_page(page); flush_dcache_page(page);
kunmap_atomic(userpage, KM_USER0); kunmap_atomic(userpage, KM_USER0);
set_extent_uptodate(tree, cur, cur + iosize - 1, set_extent_uptodate(tree, cur, cur + iosize - 1,
...@@ -2054,7 +2054,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2054,7 +2054,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
&cached, GFP_NOFS); &cached, GFP_NOFS);
break; break;
} }
em = get_extent(inode, page, page_offset, cur, em = get_extent(inode, page, pg_offset, cur,
end - cur + 1, 0); end - cur + 1, 0);
if (IS_ERR(em) || !em) { if (IS_ERR(em) || !em) {
SetPageError(page); SetPageError(page);
...@@ -2094,7 +2094,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2094,7 +2094,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
struct extent_state *cached = NULL; struct extent_state *cached = NULL;
userpage = kmap_atomic(page, KM_USER0); userpage = kmap_atomic(page, KM_USER0);
memset(userpage + page_offset, 0, iosize); memset(userpage + pg_offset, 0, iosize);
flush_dcache_page(page); flush_dcache_page(page);
kunmap_atomic(userpage, KM_USER0); kunmap_atomic(userpage, KM_USER0);
...@@ -2103,7 +2103,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2103,7 +2103,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
unlock_extent_cached(tree, cur, cur + iosize - 1, unlock_extent_cached(tree, cur, cur + iosize - 1,
&cached, GFP_NOFS); &cached, GFP_NOFS);
cur = cur + iosize; cur = cur + iosize;
page_offset += iosize; pg_offset += iosize;
continue; continue;
} }
/* the get_extent function already copied into the page */ /* 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,7 +2112,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
check_page_uptodate(tree, page); check_page_uptodate(tree, page);
unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
cur = cur + iosize; cur = cur + iosize;
page_offset += iosize; pg_offset += iosize;
continue; continue;
} }
/* we have an inline extent but it didn't get marked up /* 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,7 +2122,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
SetPageError(page); SetPageError(page);
unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
cur = cur + iosize; cur = cur + iosize;
page_offset += iosize; pg_offset += iosize;
continue; continue;
} }
...@@ -2135,7 +2135,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2135,7 +2135,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
unsigned long pnr = (last_byte >> PAGE_CACHE_SHIFT) + 1; unsigned long pnr = (last_byte >> PAGE_CACHE_SHIFT) + 1;
pnr -= page->index; pnr -= page->index;
ret = submit_extent_page(READ, tree, page, ret = submit_extent_page(READ, tree, page,
sector, disk_io_size, page_offset, sector, disk_io_size, pg_offset,
bdev, bio, pnr, bdev, bio, pnr,
end_bio_extent_readpage, mirror_num, end_bio_extent_readpage, mirror_num,
*bio_flags, *bio_flags,
...@@ -2146,7 +2146,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -2146,7 +2146,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
if (ret) if (ret)
SetPageError(page); SetPageError(page);
cur = cur + iosize; cur = cur + iosize;
page_offset += iosize; pg_offset += iosize;
} }
if (!nr) { if (!nr) {
if (!PageError(page)) if (!PageError(page))
...@@ -2751,7 +2751,7 @@ int extent_prepare_write(struct extent_io_tree *tree, ...@@ -2751,7 +2751,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
u64 cur_end; u64 cur_end;
struct extent_map *em; struct extent_map *em;
unsigned blocksize = 1 << inode->i_blkbits; unsigned blocksize = 1 << inode->i_blkbits;
size_t page_offset = 0; size_t pg_offset = 0;
size_t block_off_start; size_t block_off_start;
size_t block_off_end; size_t block_off_end;
int err = 0; int err = 0;
...@@ -2767,7 +2767,7 @@ int extent_prepare_write(struct extent_io_tree *tree, ...@@ -2767,7 +2767,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
lock_extent(tree, page_start, page_end, GFP_NOFS); lock_extent(tree, page_start, page_end, GFP_NOFS);
while (block_start <= block_end) { while (block_start <= block_end) {
em = get_extent(inode, page, page_offset, block_start, em = get_extent(inode, page, pg_offset, block_start,
block_end - block_start + 1, 1); block_end - block_start + 1, 1);
if (IS_ERR(em) || !em) if (IS_ERR(em) || !em)
goto err; goto err;
...@@ -2811,7 +2811,7 @@ int extent_prepare_write(struct extent_io_tree *tree, ...@@ -2811,7 +2811,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
block_start + iosize - 1, block_start + iosize - 1,
EXTENT_LOCKED, 0, NULL, NULL, GFP_NOFS); EXTENT_LOCKED, 0, NULL, NULL, GFP_NOFS);
ret = submit_extent_page(READ, tree, page, ret = submit_extent_page(READ, tree, page,
sector, iosize, page_offset, em->bdev, sector, iosize, pg_offset, em->bdev,
NULL, 1, NULL, 1,
end_bio_extent_preparewrite, 0, end_bio_extent_preparewrite, 0,
0, 0); 0, 0);
...@@ -2828,7 +2828,7 @@ int extent_prepare_write(struct extent_io_tree *tree, ...@@ -2828,7 +2828,7 @@ int extent_prepare_write(struct extent_io_tree *tree,
&cached, GFP_NOFS); &cached, GFP_NOFS);
block_start = cur_end + 1; block_start = cur_end + 1;
} }
page_offset = block_start & (PAGE_CACHE_SIZE - 1); pg_offset = block_start & (PAGE_CACHE_SIZE - 1);
free_extent_map(em); free_extent_map(em);
} }
if (iocount) { if (iocount) {
......
...@@ -164,7 +164,7 @@ static inline struct extent_state *extent_state_next(struct extent_state *state) ...@@ -164,7 +164,7 @@ static inline struct extent_state *extent_state_next(struct extent_state *state)
typedef struct extent_map *(get_extent_t)(struct inode *inode, typedef struct extent_map *(get_extent_t)(struct inode *inode,
struct page *page, struct page *page,
size_t page_offset, size_t pg_offset,
u64 start, u64 len, u64 start, u64 len,
int create); int create);
......
...@@ -6985,7 +6985,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -6985,7 +6985,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct btrfs_trans_handle *trans; struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(old_dir)->root; struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root; struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode = new_dentry->d_inode; struct inode *newinode = new_dentry->d_inode;
struct inode *old_inode = old_dentry->d_inode; struct inode *old_inode = old_dentry->d_inode;
struct timespec ctime = CURRENT_TIME; struct timespec ctime = CURRENT_TIME;
u64 index = 0; u64 index = 0;
...@@ -7000,18 +7000,18 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -7000,18 +7000,18 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
return -EXDEV; return -EXDEV;
if (old_inode->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID || if (old_inode->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID ||
(new_inode && new_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID)) (newinode && newinode->i_ino == BTRFS_FIRST_FREE_OBJECTID))
return -ENOTEMPTY; return -ENOTEMPTY;
if (S_ISDIR(old_inode->i_mode) && new_inode && if (S_ISDIR(old_inode->i_mode) && newinode &&
new_inode->i_size > BTRFS_EMPTY_DIR_SIZE) newinode->i_size > BTRFS_EMPTY_DIR_SIZE)
return -ENOTEMPTY; return -ENOTEMPTY;
/* /*
* we're using rename to replace one file with another. * we're using rename to replace one file with another.
* and the replacement file is large. Start IO on it now so * and the replacement file is large. Start IO on it now so
* we don't add too much work to the end of the transaction * we don't add too much work to the end of the transaction
*/ */
if (new_inode && S_ISREG(old_inode->i_mode) && new_inode->i_size && if (newinode && S_ISREG(old_inode->i_mode) && newinode->i_size &&
old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
filemap_flush(old_inode->i_mapping); filemap_flush(old_inode->i_mapping);
...@@ -7065,7 +7065,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -7065,7 +7065,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
* make sure the inode gets flushed if it is replacing * make sure the inode gets flushed if it is replacing
* something. * something.
*/ */
if (new_inode && new_inode->i_size && if (newinode && newinode->i_size &&
old_inode && S_ISREG(old_inode->i_mode)) { old_inode && S_ISREG(old_inode->i_mode)) {
btrfs_add_ordered_operation(trans, root, old_inode); btrfs_add_ordered_operation(trans, root, old_inode);
} }
...@@ -7092,16 +7092,16 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -7092,16 +7092,16 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
} }
BUG_ON(ret); BUG_ON(ret);
if (new_inode) { if (newinode) {
new_inode->i_ctime = CURRENT_TIME; newinode->i_ctime = CURRENT_TIME;
if (unlikely(new_inode->i_ino == if (unlikely(newinode->i_ino ==
BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) { BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
root_objectid = BTRFS_I(new_inode)->location.objectid; root_objectid = BTRFS_I(newinode)->location.objectid;
ret = btrfs_unlink_subvol(trans, dest, new_dir, ret = btrfs_unlink_subvol(trans, dest, new_dir,
root_objectid, root_objectid,
new_dentry->d_name.name, new_dentry->d_name.name,
new_dentry->d_name.len); new_dentry->d_name.len);
BUG_ON(new_inode->i_nlink == 0); BUG_ON(newinode->i_nlink == 0);
} else { } else {
ret = btrfs_unlink_inode(trans, dest, new_dir, ret = btrfs_unlink_inode(trans, dest, new_dir,
new_dentry->d_inode, new_dentry->d_inode,
...@@ -7109,7 +7109,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -7109,7 +7109,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
new_dentry->d_name.len); new_dentry->d_name.len);
} }
BUG_ON(ret); BUG_ON(ret);
if (new_inode->i_nlink == 0) { if (newinode->i_nlink == 0) {
ret = btrfs_orphan_add(trans, new_dentry->d_inode); ret = btrfs_orphan_add(trans, new_dentry->d_inode);
BUG_ON(ret); BUG_ON(ret);
} }
......
...@@ -739,7 +739,7 @@ static int btrfs_set_super(struct super_block *s, void *data) ...@@ -739,7 +739,7 @@ static int btrfs_set_super(struct super_block *s, void *data)
* for multiple device setup. Make sure to keep it in sync. * for multiple device setup. Make sure to keep it in sync.
*/ */
static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data) const char *device_name, void *data)
{ {
struct block_device *bdev = NULL; struct block_device *bdev = NULL;
struct super_block *s; struct super_block *s;
...@@ -762,7 +762,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, ...@@ -762,7 +762,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
if (error) if (error)
return ERR_PTR(error); return ERR_PTR(error);
error = btrfs_scan_one_device(dev_name, mode, fs_type, &fs_devices); error = btrfs_scan_one_device(device_name, mode, fs_type, &fs_devices);
if (error) if (error)
goto error_free_subvol_name; goto error_free_subvol_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment