Commit 46e665e9 authored by Harvey Harrison's avatar Harvey Harrison Committed by Theodore Ts'o

ext4: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 620de4e1
...@@ -58,7 +58,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, ...@@ -58,7 +58,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
/* If checksum is bad mark all blocks used to prevent allocation /* If checksum is bad mark all blocks used to prevent allocation
* essentially implementing a per-group read-only flag. */ * essentially implementing a per-group read-only flag. */
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) { if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Checksum bad for group %lu\n", block_group); "Checksum bad for group %lu\n", block_group);
gdp->bg_free_blocks_count = 0; gdp->bg_free_blocks_count = 0;
gdp->bg_free_inodes_count = 0; gdp->bg_free_inodes_count = 0;
...@@ -235,7 +235,7 @@ static int ext4_valid_block_bitmap(struct super_block *sb, ...@@ -235,7 +235,7 @@ static int ext4_valid_block_bitmap(struct super_block *sb,
return 1; return 1;
err_out: err_out:
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Invalid block bitmap - " "Invalid block bitmap - "
"block_group = %d, block = %llu", "block_group = %d, block = %llu",
block_group, bitmap_blk); block_group, bitmap_blk);
...@@ -264,7 +264,7 @@ read_block_bitmap(struct super_block *sb, ext4_group_t block_group) ...@@ -264,7 +264,7 @@ read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
bitmap_blk = ext4_block_bitmap(sb, desc); bitmap_blk = ext4_block_bitmap(sb, desc);
bh = sb_getblk(sb, bitmap_blk); bh = sb_getblk(sb, bitmap_blk);
if (unlikely(!bh)) { if (unlikely(!bh)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Cannot read block bitmap - " "Cannot read block bitmap - "
"block_group = %d, block_bitmap = %llu", "block_group = %d, block_bitmap = %llu",
(int)block_group, (unsigned long long)bitmap_blk); (int)block_group, (unsigned long long)bitmap_blk);
...@@ -281,7 +281,7 @@ read_block_bitmap(struct super_block *sb, ext4_group_t block_group) ...@@ -281,7 +281,7 @@ read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
} }
if (bh_submit_read(bh) < 0) { if (bh_submit_read(bh) < 0) {
put_bh(bh); put_bh(bh);
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Cannot read block bitmap - " "Cannot read block bitmap - "
"block_group = %d, block_bitmap = %llu", "block_group = %d, block_bitmap = %llu",
(int)block_group, (unsigned long long)bitmap_blk); (int)block_group, (unsigned long long)bitmap_blk);
...@@ -360,7 +360,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose, ...@@ -360,7 +360,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose,
BUG(); BUG();
} }
#define rsv_window_dump(root, verbose) \ #define rsv_window_dump(root, verbose) \
__rsv_window_dump((root), (verbose), __FUNCTION__) __rsv_window_dump((root), (verbose), __func__)
#else #else
#define rsv_window_dump(root, verbose) do {} while (0) #define rsv_window_dump(root, verbose) do {} while (0)
#endif #endif
...@@ -740,7 +740,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb, ...@@ -740,7 +740,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group), if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
bit + i, bitmap_bh->b_data)) { bit + i, bitmap_bh->b_data)) {
jbd_unlock_bh_state(bitmap_bh); jbd_unlock_bh_state(bitmap_bh);
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"bit already cleared for block %llu", "bit already cleared for block %llu",
(ext4_fsblk_t)(block + i)); (ext4_fsblk_t)(block + i));
jbd_lock_bh_state(bitmap_bh); jbd_lock_bh_state(bitmap_bh);
...@@ -1796,7 +1796,7 @@ ext4_fsblk_t ext4_new_blocks_old(handle_t *handle, struct inode *inode, ...@@ -1796,7 +1796,7 @@ ext4_fsblk_t ext4_new_blocks_old(handle_t *handle, struct inode *inode,
if (ext4_test_bit(grp_alloc_blk+i, if (ext4_test_bit(grp_alloc_blk+i,
bh2jh(bitmap_bh)->b_committed_data)) { bh2jh(bitmap_bh)->b_committed_data)) {
printk("%s: block was unexpectedly set in " printk("%s: block was unexpectedly set in "
"b_committed_data\n", __FUNCTION__); "b_committed_data\n", __func__);
} }
} }
} }
......
...@@ -9,7 +9,7 @@ int __ext4_journal_get_undo_access(const char *where, handle_t *handle, ...@@ -9,7 +9,7 @@ int __ext4_journal_get_undo_access(const char *where, handle_t *handle,
{ {
int err = jbd2_journal_get_undo_access(handle, bh); int err = jbd2_journal_get_undo_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -18,7 +18,7 @@ int __ext4_journal_get_write_access(const char *where, handle_t *handle, ...@@ -18,7 +18,7 @@ int __ext4_journal_get_write_access(const char *where, handle_t *handle,
{ {
int err = jbd2_journal_get_write_access(handle, bh); int err = jbd2_journal_get_write_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -27,7 +27,7 @@ int __ext4_journal_forget(const char *where, handle_t *handle, ...@@ -27,7 +27,7 @@ int __ext4_journal_forget(const char *where, handle_t *handle,
{ {
int err = jbd2_journal_forget(handle, bh); int err = jbd2_journal_forget(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -36,7 +36,7 @@ int __ext4_journal_revoke(const char *where, handle_t *handle, ...@@ -36,7 +36,7 @@ int __ext4_journal_revoke(const char *where, handle_t *handle,
{ {
int err = jbd2_journal_revoke(handle, blocknr, bh); int err = jbd2_journal_revoke(handle, blocknr, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -45,7 +45,7 @@ int __ext4_journal_get_create_access(const char *where, ...@@ -45,7 +45,7 @@ int __ext4_journal_get_create_access(const char *where,
{ {
int err = jbd2_journal_get_create_access(handle, bh); int err = jbd2_journal_get_create_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -54,6 +54,6 @@ int __ext4_journal_dirty_metadata(const char *where, ...@@ -54,6 +54,6 @@ int __ext4_journal_dirty_metadata(const char *where,
{ {
int err = jbd2_journal_dirty_metadata(handle, bh); int err = jbd2_journal_dirty_metadata(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __func__, bh, handle, err);
return err; return err;
} }
...@@ -308,7 +308,7 @@ static int __ext4_ext_check_header(const char *function, struct inode *inode, ...@@ -308,7 +308,7 @@ static int __ext4_ext_check_header(const char *function, struct inode *inode,
} }
#define ext4_ext_check_header(inode, eh, depth) \ #define ext4_ext_check_header(inode, eh, depth) \
__ext4_ext_check_header(__FUNCTION__, inode, eh, depth) __ext4_ext_check_header(__func__, inode, eh, depth)
#ifdef EXT_DEBUG #ifdef EXT_DEBUG
static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path) static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path)
......
...@@ -75,7 +75,7 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, ...@@ -75,7 +75,7 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh,
/* If checksum is bad mark all blocks and inodes use to prevent /* If checksum is bad mark all blocks and inodes use to prevent
* allocation, essentially implementing a per-group read-only flag. */ * allocation, essentially implementing a per-group read-only flag. */
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) { if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
ext4_error(sb, __FUNCTION__, "Checksum bad for group %lu\n", ext4_error(sb, __func__, "Checksum bad for group %lu\n",
block_group); block_group);
gdp->bg_free_blocks_count = 0; gdp->bg_free_blocks_count = 0;
gdp->bg_free_inodes_count = 0; gdp->bg_free_inodes_count = 0;
...@@ -586,7 +586,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode) ...@@ -586,7 +586,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
ino++; ino++;
if ((group == 0 && ino < EXT4_FIRST_INO(sb)) || if ((group == 0 && ino < EXT4_FIRST_INO(sb)) ||
ino > EXT4_INODES_PER_GROUP(sb)) { ino > EXT4_INODES_PER_GROUP(sb)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"reserved inode or inode > inodes count - " "reserved inode or inode > inodes count - "
"block_group = %lu, inode=%lu", group, "block_group = %lu, inode=%lu", group,
ino + group * EXT4_INODES_PER_GROUP(sb)); ino + group * EXT4_INODES_PER_GROUP(sb));
...@@ -792,7 +792,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino) ...@@ -792,7 +792,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)
/* Error cases - e2fsck has already cleaned up for us */ /* Error cases - e2fsck has already cleaned up for us */
if (ino > max_ino) { if (ino > max_ino) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"bad orphan ino %lu! e2fsck was run?", ino); "bad orphan ino %lu! e2fsck was run?", ino);
goto error; goto error;
} }
...@@ -801,7 +801,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino) ...@@ -801,7 +801,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)
bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb);
bitmap_bh = read_inode_bitmap(sb, block_group); bitmap_bh = read_inode_bitmap(sb, block_group);
if (!bitmap_bh) { if (!bitmap_bh) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"inode bitmap error for orphan %lu", ino); "inode bitmap error for orphan %lu", ino);
goto error; goto error;
} }
...@@ -826,7 +826,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino) ...@@ -826,7 +826,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)
err = PTR_ERR(inode); err = PTR_ERR(inode);
inode = NULL; inode = NULL;
bad_orphan: bad_orphan:
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"bad orphan inode %lu! e2fsck was run?", ino); "bad orphan inode %lu! e2fsck was run?", ino);
printk(KERN_NOTICE "ext4_test_bit(bit=%d, block=%llu) = %d\n", printk(KERN_NOTICE "ext4_test_bit(bit=%d, block=%llu) = %d\n",
bit, (unsigned long long)bitmap_bh->b_blocknr, bit, (unsigned long long)bitmap_bh->b_blocknr,
......
...@@ -93,7 +93,7 @@ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, ...@@ -93,7 +93,7 @@ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
BUFFER_TRACE(bh, "call ext4_journal_revoke"); BUFFER_TRACE(bh, "call ext4_journal_revoke");
err = ext4_journal_revoke(handle, blocknr, bh); err = ext4_journal_revoke(handle, blocknr, bh);
if (err) if (err)
ext4_abort(inode->i_sb, __FUNCTION__, ext4_abort(inode->i_sb, __func__,
"error %d when attempting revoke", err); "error %d when attempting revoke", err);
BUFFER_TRACE(bh, "exit"); BUFFER_TRACE(bh, "exit");
return err; return err;
...@@ -1240,7 +1240,7 @@ int ext4_journal_dirty_data(handle_t *handle, struct buffer_head *bh) ...@@ -1240,7 +1240,7 @@ int ext4_journal_dirty_data(handle_t *handle, struct buffer_head *bh)
{ {
int err = jbd2_journal_dirty_data(handle, bh); int err = jbd2_journal_dirty_data(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(__FUNCTION__, __FUNCTION__, ext4_journal_abort_handle(__func__, __func__,
bh, handle, err); bh, handle, err);
return err; return err;
} }
...@@ -3371,7 +3371,7 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode) ...@@ -3371,7 +3371,7 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
EXT4_I(inode)->i_state |= EXT4_STATE_NO_EXPAND; EXT4_I(inode)->i_state |= EXT4_STATE_NO_EXPAND;
if (mnt_count != if (mnt_count !=
le16_to_cpu(sbi->s_es->s_mnt_count)) { le16_to_cpu(sbi->s_es->s_mnt_count)) {
ext4_warning(inode->i_sb, __FUNCTION__, ext4_warning(inode->i_sb, __func__,
"Unable to expand inode %lu. Delete" "Unable to expand inode %lu. Delete"
" some EAs or run e2fsck.", " some EAs or run e2fsck.",
inode->i_ino); inode->i_ino);
...@@ -3412,7 +3412,7 @@ void ext4_dirty_inode(struct inode *inode) ...@@ -3412,7 +3412,7 @@ void ext4_dirty_inode(struct inode *inode)
current_handle->h_transaction != handle->h_transaction) { current_handle->h_transaction != handle->h_transaction) {
/* This task has a transaction open against a different fs */ /* This task has a transaction open against a different fs */
printk(KERN_EMERG "%s: transactions do not match!\n", printk(KERN_EMERG "%s: transactions do not match!\n",
__FUNCTION__); __func__);
} else { } else {
jbd_debug(5, "marking dirty. outer handle=%p\n", jbd_debug(5, "marking dirty. outer handle=%p\n",
current_handle); current_handle);
......
...@@ -734,7 +734,7 @@ static void mb_free_blocks_double(struct inode *inode, struct ext4_buddy *e4b, ...@@ -734,7 +734,7 @@ static void mb_free_blocks_double(struct inode *inode, struct ext4_buddy *e4b,
blocknr += blocknr +=
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
ext4_error(sb, __FUNCTION__, "double-free of inode" ext4_error(sb, __func__, "double-free of inode"
" %lu's block %llu(bit %u in group %lu)\n", " %lu's block %llu(bit %u in group %lu)\n",
inode ? inode->i_ino : 0, blocknr, inode ? inode->i_ino : 0, blocknr,
first + i, e4b->bd_group); first + i, e4b->bd_group);
...@@ -906,7 +906,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file, ...@@ -906,7 +906,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
} }
#undef MB_CHECK_ASSERT #undef MB_CHECK_ASSERT
#define mb_check_buddy(e4b) __mb_check_buddy(e4b, \ #define mb_check_buddy(e4b) __mb_check_buddy(e4b, \
__FILE__, __FUNCTION__, __LINE__) __FILE__, __func__, __LINE__)
#else #else
#define mb_check_buddy(e4b) #define mb_check_buddy(e4b)
#endif #endif
...@@ -980,7 +980,7 @@ static void ext4_mb_generate_buddy(struct super_block *sb, ...@@ -980,7 +980,7 @@ static void ext4_mb_generate_buddy(struct super_block *sb,
grp->bb_fragments = fragments; grp->bb_fragments = fragments;
if (free != grp->bb_free) { if (free != grp->bb_free) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"EXT4-fs: group %lu: %u blocks in bitmap, %u in gd\n", "EXT4-fs: group %lu: %u blocks in bitmap, %u in gd\n",
group, free, grp->bb_free); group, free, grp->bb_free);
/* /*
...@@ -1366,7 +1366,7 @@ static int mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b, ...@@ -1366,7 +1366,7 @@ static int mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b,
blocknr += blocknr +=
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
ext4_error(sb, __FUNCTION__, "double-free of inode" ext4_error(sb, __func__, "double-free of inode"
" %lu's block %llu(bit %u in group %lu)\n", " %lu's block %llu(bit %u in group %lu)\n",
inode ? inode->i_ino : 0, blocknr, block, inode ? inode->i_ino : 0, blocknr, block,
e4b->bd_group); e4b->bd_group);
...@@ -1847,7 +1847,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac, ...@@ -1847,7 +1847,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
* free blocks even though group info says we * free blocks even though group info says we
* we have free blocks * we have free blocks
*/ */
ext4_error(sb, __FUNCTION__, "%d free blocks as per " ext4_error(sb, __func__, "%d free blocks as per "
"group info. But bitmap says 0\n", "group info. But bitmap says 0\n",
free); free);
break; break;
...@@ -1856,7 +1856,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac, ...@@ -1856,7 +1856,7 @@ static void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
mb_find_extent(e4b, 0, i, ac->ac_g_ex.fe_len, &ex); mb_find_extent(e4b, 0, i, ac->ac_g_ex.fe_len, &ex);
BUG_ON(ex.fe_len <= 0); BUG_ON(ex.fe_len <= 0);
if (free < ex.fe_len) { if (free < ex.fe_len) {
ext4_error(sb, __FUNCTION__, "%d free blocks as per " ext4_error(sb, __func__, "%d free blocks as per "
"group info. But got %d blocks\n", "group info. But got %d blocks\n",
free, ex.fe_len); free, ex.fe_len);
/* /*
...@@ -3073,7 +3073,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, ...@@ -3073,7 +3073,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
in_range(block, ext4_inode_table(sb, gdp), in_range(block, ext4_inode_table(sb, gdp),
EXT4_SB(sb)->s_itb_per_group)) { EXT4_SB(sb)->s_itb_per_group)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Allocating block in system zone - block = %llu", "Allocating block in system zone - block = %llu",
block); block);
} }
...@@ -3786,7 +3786,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, ...@@ -3786,7 +3786,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
pa, (unsigned long) pa->pa_lstart, pa, (unsigned long) pa->pa_lstart,
(unsigned long) pa->pa_pstart, (unsigned long) pa->pa_pstart,
(unsigned long) pa->pa_len); (unsigned long) pa->pa_len);
ext4_error(sb, __FUNCTION__, "free %u, pa_free %u\n", ext4_error(sb, __func__, "free %u, pa_free %u\n",
free, pa->pa_free); free, pa->pa_free);
/* /*
* pa is already deleted so we use the value obtained * pa is already deleted so we use the value obtained
...@@ -4490,7 +4490,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode, ...@@ -4490,7 +4490,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode,
if (block < le32_to_cpu(es->s_first_data_block) || if (block < le32_to_cpu(es->s_first_data_block) ||
block + count < block || block + count < block ||
block + count > ext4_blocks_count(es)) { block + count > ext4_blocks_count(es)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Freeing blocks not in datazone - " "Freeing blocks not in datazone - "
"block = %lu, count = %lu", block, count); "block = %lu, count = %lu", block, count);
goto error_return; goto error_return;
...@@ -4531,7 +4531,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode, ...@@ -4531,7 +4531,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode,
in_range(block + count - 1, ext4_inode_table(sb, gdp), in_range(block + count - 1, ext4_inode_table(sb, gdp),
EXT4_SB(sb)->s_itb_per_group)) { EXT4_SB(sb)->s_itb_per_group)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Freeing blocks in system zone - " "Freeing blocks in system zone - "
"Block = %lu, count = %lu", block, count); "Block = %lu, count = %lu", block, count);
} }
......
...@@ -353,7 +353,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -353,7 +353,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
if (root->info.hash_version != DX_HASH_TEA && if (root->info.hash_version != DX_HASH_TEA &&
root->info.hash_version != DX_HASH_HALF_MD4 && root->info.hash_version != DX_HASH_HALF_MD4 &&
root->info.hash_version != DX_HASH_LEGACY) { root->info.hash_version != DX_HASH_LEGACY) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"Unrecognised inode hash code %d", "Unrecognised inode hash code %d",
root->info.hash_version); root->info.hash_version);
brelse(bh); brelse(bh);
...@@ -367,7 +367,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -367,7 +367,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
hash = hinfo->hash; hash = hinfo->hash;
if (root->info.unused_flags & 1) { if (root->info.unused_flags & 1) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"Unimplemented inode hash flags: %#06x", "Unimplemented inode hash flags: %#06x",
root->info.unused_flags); root->info.unused_flags);
brelse(bh); brelse(bh);
...@@ -376,7 +376,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -376,7 +376,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
} }
if ((indirect = root->info.indirect_levels) > 1) { if ((indirect = root->info.indirect_levels) > 1) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"Unimplemented inode hash depth: %#06x", "Unimplemented inode hash depth: %#06x",
root->info.indirect_levels); root->info.indirect_levels);
brelse(bh); brelse(bh);
...@@ -389,7 +389,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -389,7 +389,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
if (dx_get_limit(entries) != dx_root_limit(dir, if (dx_get_limit(entries) != dx_root_limit(dir,
root->info.info_length)) { root->info.info_length)) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"dx entry: limit != root limit"); "dx entry: limit != root limit");
brelse(bh); brelse(bh);
*err = ERR_BAD_DX_DIR; *err = ERR_BAD_DX_DIR;
...@@ -401,7 +401,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -401,7 +401,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
{ {
count = dx_get_count(entries); count = dx_get_count(entries);
if (!count || count > dx_get_limit(entries)) { if (!count || count > dx_get_limit(entries)) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"dx entry: no count or count > limit"); "dx entry: no count or count > limit");
brelse(bh); brelse(bh);
*err = ERR_BAD_DX_DIR; *err = ERR_BAD_DX_DIR;
...@@ -446,7 +446,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -446,7 +446,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
goto fail2; goto fail2;
at = entries = ((struct dx_node *) bh->b_data)->entries; at = entries = ((struct dx_node *) bh->b_data)->entries;
if (dx_get_limit(entries) != dx_node_limit (dir)) { if (dx_get_limit(entries) != dx_node_limit (dir)) {
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"dx entry: limit != node limit"); "dx entry: limit != node limit");
brelse(bh); brelse(bh);
*err = ERR_BAD_DX_DIR; *err = ERR_BAD_DX_DIR;
...@@ -462,7 +462,7 @@ dx_probe(struct dentry *dentry, struct inode *dir, ...@@ -462,7 +462,7 @@ dx_probe(struct dentry *dentry, struct inode *dir,
} }
fail: fail:
if (*err == ERR_BAD_DX_DIR) if (*err == ERR_BAD_DX_DIR)
ext4_warning(dir->i_sb, __FUNCTION__, ext4_warning(dir->i_sb, __func__,
"Corrupt dir inode %ld, running e2fsck is " "Corrupt dir inode %ld, running e2fsck is "
"recommended.", dir->i_ino); "recommended.", dir->i_ino);
return NULL; return NULL;
...@@ -919,7 +919,7 @@ static struct buffer_head * ext4_find_entry (struct dentry *dentry, ...@@ -919,7 +919,7 @@ static struct buffer_head * ext4_find_entry (struct dentry *dentry,
wait_on_buffer(bh); wait_on_buffer(bh);
if (!buffer_uptodate(bh)) { if (!buffer_uptodate(bh)) {
/* read error, skip block & hope for the best */ /* read error, skip block & hope for the best */
ext4_error(sb, __FUNCTION__, "reading directory #%lu " ext4_error(sb, __func__, "reading directory #%lu "
"offset %lu", dir->i_ino, "offset %lu", dir->i_ino,
(unsigned long)block); (unsigned long)block);
brelse(bh); brelse(bh);
...@@ -1012,7 +1012,7 @@ static struct buffer_head * ext4_dx_find_entry(struct dentry *dentry, ...@@ -1012,7 +1012,7 @@ static struct buffer_head * ext4_dx_find_entry(struct dentry *dentry,
retval = ext4_htree_next_block(dir, hash, frame, retval = ext4_htree_next_block(dir, hash, frame,
frames, NULL); frames, NULL);
if (retval < 0) { if (retval < 0) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"error reading index page in directory #%lu", "error reading index page in directory #%lu",
dir->i_ino); dir->i_ino);
*err = retval; *err = retval;
...@@ -1537,7 +1537,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry, ...@@ -1537,7 +1537,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
if (levels && (dx_get_count(frames->entries) == if (levels && (dx_get_count(frames->entries) ==
dx_get_limit(frames->entries))) { dx_get_limit(frames->entries))) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Directory index full!"); "Directory index full!");
err = -ENOSPC; err = -ENOSPC;
goto cleanup; goto cleanup;
...@@ -1865,11 +1865,11 @@ static int empty_dir (struct inode * inode) ...@@ -1865,11 +1865,11 @@ static int empty_dir (struct inode * inode)
if (inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2) || if (inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2) ||
!(bh = ext4_bread (NULL, inode, 0, 0, &err))) { !(bh = ext4_bread (NULL, inode, 0, 0, &err))) {
if (err) if (err)
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"error %d reading directory #%lu offset 0", "error %d reading directory #%lu offset 0",
err, inode->i_ino); err, inode->i_ino);
else else
ext4_warning(inode->i_sb, __FUNCTION__, ext4_warning(inode->i_sb, __func__,
"bad directory (dir #%lu) - no data block", "bad directory (dir #%lu) - no data block",
inode->i_ino); inode->i_ino);
return 1; return 1;
...@@ -1898,7 +1898,7 @@ static int empty_dir (struct inode * inode) ...@@ -1898,7 +1898,7 @@ static int empty_dir (struct inode * inode)
offset >> EXT4_BLOCK_SIZE_BITS(sb), 0, &err); offset >> EXT4_BLOCK_SIZE_BITS(sb), 0, &err);
if (!bh) { if (!bh) {
if (err) if (err)
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"error %d reading directory" "error %d reading directory"
" #%lu offset %lu", " #%lu offset %lu",
err, inode->i_ino, offset); err, inode->i_ino, offset);
......
...@@ -50,63 +50,63 @@ static int verify_group_input(struct super_block *sb, ...@@ -50,63 +50,63 @@ static int verify_group_input(struct super_block *sb,
ext4_get_group_no_and_offset(sb, start, NULL, &offset); ext4_get_group_no_and_offset(sb, start, NULL, &offset);
if (group != sbi->s_groups_count) if (group != sbi->s_groups_count)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Cannot add at group %u (only %lu groups)", "Cannot add at group %u (only %lu groups)",
input->group, sbi->s_groups_count); input->group, sbi->s_groups_count);
else if (offset != 0) else if (offset != 0)
ext4_warning(sb, __FUNCTION__, "Last group not full"); ext4_warning(sb, __func__, "Last group not full");
else if (input->reserved_blocks > input->blocks_count / 5) else if (input->reserved_blocks > input->blocks_count / 5)
ext4_warning(sb, __FUNCTION__, "Reserved blocks too high (%u)", ext4_warning(sb, __func__, "Reserved blocks too high (%u)",
input->reserved_blocks); input->reserved_blocks);
else if (free_blocks_count < 0) else if (free_blocks_count < 0)
ext4_warning(sb, __FUNCTION__, "Bad blocks count %u", ext4_warning(sb, __func__, "Bad blocks count %u",
input->blocks_count); input->blocks_count);
else if (!(bh = sb_bread(sb, end - 1))) else if (!(bh = sb_bread(sb, end - 1)))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Cannot read last block (%llu)", "Cannot read last block (%llu)",
end - 1); end - 1);
else if (outside(input->block_bitmap, start, end)) else if (outside(input->block_bitmap, start, end))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Block bitmap not in group (block %llu)", "Block bitmap not in group (block %llu)",
(unsigned long long)input->block_bitmap); (unsigned long long)input->block_bitmap);
else if (outside(input->inode_bitmap, start, end)) else if (outside(input->inode_bitmap, start, end))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Inode bitmap not in group (block %llu)", "Inode bitmap not in group (block %llu)",
(unsigned long long)input->inode_bitmap); (unsigned long long)input->inode_bitmap);
else if (outside(input->inode_table, start, end) || else if (outside(input->inode_table, start, end) ||
outside(itend - 1, start, end)) outside(itend - 1, start, end))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Inode table not in group (blocks %llu-%llu)", "Inode table not in group (blocks %llu-%llu)",
(unsigned long long)input->inode_table, itend - 1); (unsigned long long)input->inode_table, itend - 1);
else if (input->inode_bitmap == input->block_bitmap) else if (input->inode_bitmap == input->block_bitmap)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Block bitmap same as inode bitmap (%llu)", "Block bitmap same as inode bitmap (%llu)",
(unsigned long long)input->block_bitmap); (unsigned long long)input->block_bitmap);
else if (inside(input->block_bitmap, input->inode_table, itend)) else if (inside(input->block_bitmap, input->inode_table, itend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Block bitmap (%llu) in inode table (%llu-%llu)", "Block bitmap (%llu) in inode table (%llu-%llu)",
(unsigned long long)input->block_bitmap, (unsigned long long)input->block_bitmap,
(unsigned long long)input->inode_table, itend - 1); (unsigned long long)input->inode_table, itend - 1);
else if (inside(input->inode_bitmap, input->inode_table, itend)) else if (inside(input->inode_bitmap, input->inode_table, itend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Inode bitmap (%llu) in inode table (%llu-%llu)", "Inode bitmap (%llu) in inode table (%llu-%llu)",
(unsigned long long)input->inode_bitmap, (unsigned long long)input->inode_bitmap,
(unsigned long long)input->inode_table, itend - 1); (unsigned long long)input->inode_table, itend - 1);
else if (inside(input->block_bitmap, start, metaend)) else if (inside(input->block_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Block bitmap (%llu) in GDT table" "Block bitmap (%llu) in GDT table"
" (%llu-%llu)", " (%llu-%llu)",
(unsigned long long)input->block_bitmap, (unsigned long long)input->block_bitmap,
start, metaend - 1); start, metaend - 1);
else if (inside(input->inode_bitmap, start, metaend)) else if (inside(input->inode_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Inode bitmap (%llu) in GDT table" "Inode bitmap (%llu) in GDT table"
" (%llu-%llu)", " (%llu-%llu)",
(unsigned long long)input->inode_bitmap, (unsigned long long)input->inode_bitmap,
start, metaend - 1); start, metaend - 1);
else if (inside(input->inode_table, start, metaend) || else if (inside(input->inode_table, start, metaend) ||
inside(itend - 1, start, metaend)) inside(itend - 1, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Inode table (%llu-%llu) overlaps" "Inode table (%llu-%llu) overlaps"
"GDT table (%llu-%llu)", "GDT table (%llu-%llu)",
(unsigned long long)input->inode_table, (unsigned long long)input->inode_table,
...@@ -368,7 +368,7 @@ static int verify_reserved_gdb(struct super_block *sb, ...@@ -368,7 +368,7 @@ static int verify_reserved_gdb(struct super_block *sb,
while ((grp = ext4_list_backups(sb, &three, &five, &seven)) < end) { while ((grp = ext4_list_backups(sb, &three, &five, &seven)) < end) {
if (le32_to_cpu(*p++) != if (le32_to_cpu(*p++) !=
grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){ grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"reserved GDT %llu" "reserved GDT %llu"
" missing grp %d (%llu)", " missing grp %d (%llu)",
blk, grp, blk, grp,
...@@ -424,7 +424,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, ...@@ -424,7 +424,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
*/ */
if (EXT4_SB(sb)->s_sbh->b_blocknr != if (EXT4_SB(sb)->s_sbh->b_blocknr !=
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"won't resize using backup superblock at %llu", "won't resize using backup superblock at %llu",
(unsigned long long)EXT4_SB(sb)->s_sbh->b_blocknr); (unsigned long long)EXT4_SB(sb)->s_sbh->b_blocknr);
return -EPERM; return -EPERM;
...@@ -448,7 +448,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, ...@@ -448,7 +448,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
data = (__le32 *)dind->b_data; data = (__le32 *)dind->b_data;
if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) { if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"new group %u GDT block %llu not reserved", "new group %u GDT block %llu not reserved",
input->group, gdblock); input->group, gdblock);
err = -EINVAL; err = -EINVAL;
...@@ -472,7 +472,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, ...@@ -472,7 +472,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
GFP_KERNEL); GFP_KERNEL);
if (!n_group_desc) { if (!n_group_desc) {
err = -ENOMEM; err = -ENOMEM;
ext4_warning (sb, __FUNCTION__, ext4_warning(sb, __func__,
"not enough memory for %lu groups", gdb_num + 1); "not enough memory for %lu groups", gdb_num + 1);
goto exit_inode; goto exit_inode;
} }
...@@ -570,7 +570,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, ...@@ -570,7 +570,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
/* Get each reserved primary GDT block and verify it holds backups */ /* Get each reserved primary GDT block and verify it holds backups */
for (res = 0; res < reserved_gdb; res++, blk++) { for (res = 0; res < reserved_gdb; res++, blk++) {
if (le32_to_cpu(*data) != blk) { if (le32_to_cpu(*data) != blk) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"reserved block %llu" "reserved block %llu"
" not at offset %ld", " not at offset %ld",
blk, blk,
...@@ -714,7 +714,7 @@ static void update_backups(struct super_block *sb, ...@@ -714,7 +714,7 @@ static void update_backups(struct super_block *sb,
*/ */
exit_err: exit_err:
if (err) { if (err) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"can't update backup for group %lu (err %d), " "can't update backup for group %lu (err %d), "
"forcing fsck on next reboot", group, err); "forcing fsck on next reboot", group, err);
sbi->s_mount_state &= ~EXT4_VALID_FS; sbi->s_mount_state &= ~EXT4_VALID_FS;
...@@ -754,33 +754,33 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) ...@@ -754,33 +754,33 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
if (gdb_off == 0 && !EXT4_HAS_RO_COMPAT_FEATURE(sb, if (gdb_off == 0 && !EXT4_HAS_RO_COMPAT_FEATURE(sb,
EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER)) { EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Can't resize non-sparse filesystem further"); "Can't resize non-sparse filesystem further");
return -EPERM; return -EPERM;
} }
if (ext4_blocks_count(es) + input->blocks_count < if (ext4_blocks_count(es) + input->blocks_count <
ext4_blocks_count(es)) { ext4_blocks_count(es)) {
ext4_warning(sb, __FUNCTION__, "blocks_count overflow\n"); ext4_warning(sb, __func__, "blocks_count overflow\n");
return -EINVAL; return -EINVAL;
} }
if (le32_to_cpu(es->s_inodes_count) + EXT4_INODES_PER_GROUP(sb) < if (le32_to_cpu(es->s_inodes_count) + EXT4_INODES_PER_GROUP(sb) <
le32_to_cpu(es->s_inodes_count)) { le32_to_cpu(es->s_inodes_count)) {
ext4_warning(sb, __FUNCTION__, "inodes_count overflow\n"); ext4_warning(sb, __func__, "inodes_count overflow\n");
return -EINVAL; return -EINVAL;
} }
if (reserved_gdb || gdb_off == 0) { if (reserved_gdb || gdb_off == 0) {
if (!EXT4_HAS_COMPAT_FEATURE(sb, if (!EXT4_HAS_COMPAT_FEATURE(sb,
EXT4_FEATURE_COMPAT_RESIZE_INODE)){ EXT4_FEATURE_COMPAT_RESIZE_INODE)){
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"No reserved GDT blocks, can't resize"); "No reserved GDT blocks, can't resize");
return -EPERM; return -EPERM;
} }
inode = ext4_iget(sb, EXT4_RESIZE_INO); inode = ext4_iget(sb, EXT4_RESIZE_INO);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"Error opening resize inode"); "Error opening resize inode");
return PTR_ERR(inode); return PTR_ERR(inode);
} }
...@@ -809,7 +809,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) ...@@ -809,7 +809,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
lock_super(sb); lock_super(sb);
if (input->group != sbi->s_groups_count) { if (input->group != sbi->s_groups_count) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"multiple resizers run on filesystem!"); "multiple resizers run on filesystem!");
err = -EBUSY; err = -EBUSY;
goto exit_journal; goto exit_journal;
...@@ -975,13 +975,13 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -975,13 +975,13 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
" too large to resize to %llu blocks safely\n", " too large to resize to %llu blocks safely\n",
sb->s_id, n_blocks_count); sb->s_id, n_blocks_count);
if (sizeof(sector_t) < 8) if (sizeof(sector_t) < 8)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"CONFIG_LBD not enabled\n"); "CONFIG_LBD not enabled\n");
return -EINVAL; return -EINVAL;
} }
if (n_blocks_count < o_blocks_count) { if (n_blocks_count < o_blocks_count) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"can't shrink FS - resize aborted"); "can't shrink FS - resize aborted");
return -EBUSY; return -EBUSY;
} }
...@@ -990,7 +990,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -990,7 +990,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
ext4_get_group_no_and_offset(sb, o_blocks_count, NULL, &last); ext4_get_group_no_and_offset(sb, o_blocks_count, NULL, &last);
if (last == 0) { if (last == 0) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"need to use ext2online to resize further"); "need to use ext2online to resize further");
return -EPERM; return -EPERM;
} }
...@@ -998,7 +998,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -998,7 +998,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
add = EXT4_BLOCKS_PER_GROUP(sb) - last; add = EXT4_BLOCKS_PER_GROUP(sb) - last;
if (o_blocks_count + add < o_blocks_count) { if (o_blocks_count + add < o_blocks_count) {
ext4_warning(sb, __FUNCTION__, "blocks_count overflow"); ext4_warning(sb, __func__, "blocks_count overflow");
return -EINVAL; return -EINVAL;
} }
...@@ -1006,7 +1006,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -1006,7 +1006,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
add = n_blocks_count - o_blocks_count; add = n_blocks_count - o_blocks_count;
if (o_blocks_count + add < n_blocks_count) if (o_blocks_count + add < n_blocks_count)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"will only finish group (%llu" "will only finish group (%llu"
" blocks, %u new)", " blocks, %u new)",
o_blocks_count + add, add); o_blocks_count + add, add);
...@@ -1014,7 +1014,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -1014,7 +1014,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
/* See if the device is actually as big as what was requested */ /* See if the device is actually as big as what was requested */
bh = sb_bread(sb, o_blocks_count + add -1); bh = sb_bread(sb, o_blocks_count + add -1);
if (!bh) { if (!bh) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"can't read last block, resize aborted"); "can't read last block, resize aborted");
return -ENOSPC; return -ENOSPC;
} }
...@@ -1026,13 +1026,13 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -1026,13 +1026,13 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
handle = ext4_journal_start_sb(sb, 3); handle = ext4_journal_start_sb(sb, 3);
if (IS_ERR(handle)) { if (IS_ERR(handle)) {
err = PTR_ERR(handle); err = PTR_ERR(handle);
ext4_warning(sb, __FUNCTION__, "error %d on journal start",err); ext4_warning(sb, __func__, "error %d on journal start", err);
goto exit_put; goto exit_put;
} }
lock_super(sb); lock_super(sb);
if (o_blocks_count != ext4_blocks_count(es)) { if (o_blocks_count != ext4_blocks_count(es)) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"multiple resizers run on filesystem!"); "multiple resizers run on filesystem!");
unlock_super(sb); unlock_super(sb);
ext4_journal_stop(handle); ext4_journal_stop(handle);
...@@ -1042,7 +1042,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -1042,7 +1042,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
if ((err = ext4_journal_get_write_access(handle, if ((err = ext4_journal_get_write_access(handle,
EXT4_SB(sb)->s_sbh))) { EXT4_SB(sb)->s_sbh))) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"error %d on journal write access", err); "error %d on journal write access", err);
unlock_super(sb); unlock_super(sb);
ext4_journal_stop(handle); ext4_journal_stop(handle);
......
...@@ -135,7 +135,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks) ...@@ -135,7 +135,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
* take the FS itself readonly cleanly. */ * take the FS itself readonly cleanly. */
journal = EXT4_SB(sb)->s_journal; journal = EXT4_SB(sb)->s_journal;
if (is_journal_aborted(journal)) { if (is_journal_aborted(journal)) {
ext4_abort(sb, __FUNCTION__, ext4_abort(sb, __func__,
"Detected aborted journal"); "Detected aborted journal");
return ERR_PTR(-EROFS); return ERR_PTR(-EROFS);
} }
...@@ -355,7 +355,7 @@ void ext4_update_dynamic_rev(struct super_block *sb) ...@@ -355,7 +355,7 @@ void ext4_update_dynamic_rev(struct super_block *sb)
if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV) if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV)
return; return;
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __func__,
"updating to rev %d because of new feature flag, " "updating to rev %d because of new feature flag, "
"running e2fsck is recommended", "running e2fsck is recommended",
EXT4_DYNAMIC_REV); EXT4_DYNAMIC_REV);
...@@ -1511,7 +1511,7 @@ static int ext4_check_descriptors(struct super_block *sb) ...@@ -1511,7 +1511,7 @@ static int ext4_check_descriptors(struct super_block *sb)
return 0; return 0;
} }
if (!ext4_group_desc_csum_verify(sbi, i, gdp)) { if (!ext4_group_desc_csum_verify(sbi, i, gdp)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"Checksum for group %lu failed (%u!=%u)\n", "Checksum for group %lu failed (%u!=%u)\n",
i, le16_to_cpu(ext4_group_desc_csum(sbi, i, i, le16_to_cpu(ext4_group_desc_csum(sbi, i,
gdp)), le16_to_cpu(gdp->bg_checksum)); gdp)), le16_to_cpu(gdp->bg_checksum));
...@@ -1605,7 +1605,7 @@ static void ext4_orphan_cleanup (struct super_block * sb, ...@@ -1605,7 +1605,7 @@ static void ext4_orphan_cleanup (struct super_block * sb,
if (inode->i_nlink) { if (inode->i_nlink) {
printk(KERN_DEBUG printk(KERN_DEBUG
"%s: truncating inode %lu to %Ld bytes\n", "%s: truncating inode %lu to %Ld bytes\n",
__FUNCTION__, inode->i_ino, inode->i_size); __func__, inode->i_ino, inode->i_size);
jbd_debug(2, "truncating inode %lu to %Ld bytes\n", jbd_debug(2, "truncating inode %lu to %Ld bytes\n",
inode->i_ino, inode->i_size); inode->i_ino, inode->i_size);
ext4_truncate(inode); ext4_truncate(inode);
...@@ -1613,7 +1613,7 @@ static void ext4_orphan_cleanup (struct super_block * sb, ...@@ -1613,7 +1613,7 @@ static void ext4_orphan_cleanup (struct super_block * sb,
} else { } else {
printk(KERN_DEBUG printk(KERN_DEBUG
"%s: deleting unreferenced inode %lu\n", "%s: deleting unreferenced inode %lu\n",
__FUNCTION__, inode->i_ino); __func__, inode->i_ino);
jbd_debug(2, "deleting unreferenced inode %lu\n", jbd_debug(2, "deleting unreferenced inode %lu\n",
inode->i_ino); inode->i_ino);
nr_orphans++; nr_orphans++;
...@@ -2699,9 +2699,9 @@ static void ext4_clear_journal_err(struct super_block * sb, ...@@ -2699,9 +2699,9 @@ static void ext4_clear_journal_err(struct super_block * sb,
char nbuf[16]; char nbuf[16];
errstr = ext4_decode_error(sb, j_errno, nbuf); errstr = ext4_decode_error(sb, j_errno, nbuf);
ext4_warning(sb, __FUNCTION__, "Filesystem error recorded " ext4_warning(sb, __func__, "Filesystem error recorded "
"from previous mount: %s", errstr); "from previous mount: %s", errstr);
ext4_warning(sb, __FUNCTION__, "Marking fs in need of " ext4_warning(sb, __func__, "Marking fs in need of "
"filesystem check."); "filesystem check.");
EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
...@@ -2828,7 +2828,7 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) ...@@ -2828,7 +2828,7 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data)
} }
if (sbi->s_mount_opt & EXT4_MOUNT_ABORT) if (sbi->s_mount_opt & EXT4_MOUNT_ABORT)
ext4_abort(sb, __FUNCTION__, "Abort forced by user"); ext4_abort(sb, __func__, "Abort forced by user");
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
((sbi->s_mount_opt & EXT4_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); ((sbi->s_mount_opt & EXT4_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
......
...@@ -227,7 +227,7 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name, ...@@ -227,7 +227,7 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
ea_bdebug(bh, "b_count=%d, refcount=%d", ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) { if (ext4_xattr_check_block(bh)) {
bad_block: ext4_error(inode->i_sb, __FUNCTION__, bad_block: ext4_error(inode->i_sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
...@@ -369,7 +369,7 @@ ext4_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) ...@@ -369,7 +369,7 @@ ext4_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
ea_bdebug(bh, "b_count=%d, refcount=%d", ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) { if (ext4_xattr_check_block(bh)) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
...@@ -661,7 +661,7 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i, ...@@ -661,7 +661,7 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
atomic_read(&(bs->bh->b_count)), atomic_read(&(bs->bh->b_count)),
le32_to_cpu(BHDR(bs->bh)->h_refcount)); le32_to_cpu(BHDR(bs->bh)->h_refcount));
if (ext4_xattr_check_block(bs->bh)) { if (ext4_xattr_check_block(bs->bh)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
...@@ -861,7 +861,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, ...@@ -861,7 +861,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
goto cleanup; goto cleanup;
bad_block: bad_block:
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
...@@ -1164,7 +1164,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, ...@@ -1164,7 +1164,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
if (!bh) if (!bh)
goto cleanup; goto cleanup;
if (ext4_xattr_check_block(bh)) { if (ext4_xattr_check_block(bh)) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
...@@ -1339,14 +1339,14 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode) ...@@ -1339,14 +1339,14 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode)
goto cleanup; goto cleanup;
bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
if (!bh) { if (!bh) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: block %llu read error", inode->i_ino, "inode %lu: block %llu read error", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
} }
if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) ||
BHDR(bh)->h_blocks != cpu_to_le32(1)) { BHDR(bh)->h_blocks != cpu_to_le32(1)) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: bad block %llu", inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
...@@ -1473,7 +1473,7 @@ ext4_xattr_cache_find(struct inode *inode, struct ext4_xattr_header *header, ...@@ -1473,7 +1473,7 @@ ext4_xattr_cache_find(struct inode *inode, struct ext4_xattr_header *header,
} }
bh = sb_bread(inode->i_sb, ce->e_block); bh = sb_bread(inode->i_sb, ce->e_block);
if (!bh) { if (!bh) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __func__,
"inode %lu: block %lu read error", "inode %lu: block %lu read error",
inode->i_ino, (unsigned long) ce->e_block); inode->i_ino, (unsigned long) ce->e_block);
} else if (le32_to_cpu(BHDR(bh)->h_refcount) >= } else if (le32_to_cpu(BHDR(bh)->h_refcount) >=
......
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