fs/affs/file.c: fix shadow warnings
Four functions declared variables twice resulting in shadow warnings. This patch renames internal variables and adds blank line after declarations. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3bc759931d
commit
73516ace94
|
@ -584,11 +584,14 @@ affs_extent_file_ofs(struct inode *inode, u32 newsize)
|
|||
bh->b_state &= ~(1UL << BH_New);
|
||||
mark_buffer_dirty_inode(bh, inode);
|
||||
if (prev_bh) {
|
||||
u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
if (tmp)
|
||||
affs_warning(sb, "extent_file_ofs", "next block already set for %d (%d)", bidx, tmp);
|
||||
u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
|
||||
if (tmp_next)
|
||||
affs_warning(sb, "extent_file_ofs",
|
||||
"next block already set for %d (%d)",
|
||||
bidx, tmp_next);
|
||||
AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next);
|
||||
mark_buffer_dirty_inode(prev_bh, inode);
|
||||
affs_brelse(prev_bh);
|
||||
}
|
||||
|
@ -727,11 +730,14 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
|
|||
AFFS_DATA_HEAD(bh)->next = 0;
|
||||
bh->b_state &= ~(1UL << BH_New);
|
||||
if (prev_bh) {
|
||||
u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
if (tmp)
|
||||
affs_warning(sb, "commit_write_ofs", "next block already set for %d (%d)", bidx, tmp);
|
||||
u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
|
||||
if (tmp_next)
|
||||
affs_warning(sb, "commit_write_ofs",
|
||||
"next block already set for %d (%d)",
|
||||
bidx, tmp_next);
|
||||
AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next);
|
||||
mark_buffer_dirty_inode(prev_bh, inode);
|
||||
}
|
||||
}
|
||||
|
@ -758,11 +764,14 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
|
|||
AFFS_DATA_HEAD(bh)->next = 0;
|
||||
bh->b_state &= ~(1UL << BH_New);
|
||||
if (prev_bh) {
|
||||
u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
if (tmp)
|
||||
affs_warning(sb, "commit_write_ofs", "next block already set for %d (%d)", bidx, tmp);
|
||||
u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next);
|
||||
|
||||
if (tmp_next)
|
||||
affs_warning(sb, "commit_write_ofs",
|
||||
"next block already set for %d (%d)",
|
||||
bidx, tmp_next);
|
||||
AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp);
|
||||
affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next);
|
||||
mark_buffer_dirty_inode(prev_bh, inode);
|
||||
}
|
||||
} else if (be32_to_cpu(AFFS_DATA_HEAD(bh)->size) < tmp)
|
||||
|
@ -842,12 +851,12 @@ affs_truncate(struct inode *inode)
|
|||
struct address_space *mapping = inode->i_mapping;
|
||||
struct page *page;
|
||||
void *fsdata;
|
||||
loff_t size = inode->i_size;
|
||||
loff_t isize = inode->i_size;
|
||||
int res;
|
||||
|
||||
res = mapping->a_ops->write_begin(NULL, mapping, size, 0, 0, &page, &fsdata);
|
||||
res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, 0, &page, &fsdata);
|
||||
if (!res)
|
||||
res = mapping->a_ops->write_end(NULL, mapping, size, 0, 0, page, fsdata);
|
||||
res = mapping->a_ops->write_end(NULL, mapping, isize, 0, 0, page, fsdata);
|
||||
else
|
||||
inode->i_size = AFFS_I(inode)->mmu_private;
|
||||
mark_inode_dirty(inode);
|
||||
|
|
Loading…
Reference in New Issue