From: Jan Kara Attached patch fixes debug messages of quota code in reiserfs so that they compile. Chris Mason agreed the patch. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton --- 25-akpm/fs/reiserfs/bitmap.c | 8 ++++---- 25-akpm/fs/reiserfs/stree.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff -puN fs/reiserfs/bitmap.c~fix-reiserfs-quota-debug-messages fs/reiserfs/bitmap.c --- 25/fs/reiserfs/bitmap.c~fix-reiserfs-quota-debug-messages Fri Nov 19 14:32:40 2004 +++ 25-akpm/fs/reiserfs/bitmap.c Fri Nov 19 14:32:40 2004 @@ -956,14 +956,14 @@ static inline int blocknrs_and_prealloc_ if (!hint->formatted_node) { int quota_ret; #ifdef REISERQUOTA_DEBUG - reiserfs_debug (s, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid); + reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid); #endif quota_ret = DQUOT_ALLOC_BLOCK_NODIRTY(hint->inode, amount_needed); if (quota_ret) /* Quota exceeded? */ return QUOTA_EXCEEDED; if (hint->preallocate && hint->prealloc_size ) { #ifdef REISERQUOTA_DEBUG - reiserfs_debug (s, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid); + reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid); #endif quota_ret = DQUOT_PREALLOC_BLOCK_NODIRTY(hint->inode, hint->prealloc_size); if (quota_ret) @@ -1009,7 +1009,7 @@ static inline int blocknrs_and_prealloc_ /* Free the blocks */ if (!hint->formatted_node) { #ifdef REISERQUOTA_DEBUG - reiserfs_debug (s, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid); + reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid); #endif DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated); /* Free not allocated blocks */ } @@ -1029,7 +1029,7 @@ static inline int blocknrs_and_prealloc_ nr_allocated + REISERFS_I(hint->inode)->i_prealloc_count) { /* Some of preallocation blocks were not allocated */ #ifdef REISERQUOTA_DEBUG - reiserfs_debug (s, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - INODE_INFO(hint->inode)->i_prealloc_count, hint->inode->i_uid); + reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - REISERFS_I(hint->inode)->i_prealloc_count, hint->inode->i_uid); #endif DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated - diff -puN fs/reiserfs/stree.c~fix-reiserfs-quota-debug-messages fs/reiserfs/stree.c --- 25/fs/reiserfs/stree.c~fix-reiserfs-quota-debug-messages Fri Nov 19 14:32:40 2004 +++ 25-akpm/fs/reiserfs/stree.c Fri Nov 19 14:32:40 2004 @@ -1388,7 +1388,7 @@ int reiserfs_delete_item (struct reiserf do_balance(&s_del_balance, NULL, NULL, M_DELETE); #ifdef REISERQUOTA_DEBUG - reiserfs_debug (p_s_sb, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih)); + reiserfs_debug (p_s_sb, REISERFS_DEBUG_CODE, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih)); #endif DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes); @@ -1465,7 +1465,7 @@ void reiserfs_delete_solid_item (struct do_balance (&tb, NULL, NULL, M_DELETE); if (inode) { /* Should we count quota for item? (we don't count quotas for save-links) */ #ifdef REISERQUOTA_DEBUG - reiserfs_debug (th->t_super, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key)); + reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key)); #endif DQUOT_FREE_SPACE_NODIRTY(inode, quota_cut_bytes); } @@ -1786,7 +1786,7 @@ int reiserfs_cut_from_item (struct reise REISERFS_I(p_s_inode)->i_flags &= ~i_pack_on_close_mask ; } #ifdef REISERQUOTA_DEBUG - reiserfs_debug (p_s_inode->i_sb, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?'); + reiserfs_debug (p_s_inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?'); #endif DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes); return n_ret_value; @@ -1999,7 +1999,7 @@ int reiserfs_paste_into_item (struct rei fs_gen = get_generation(inode->i_sb) ; #ifdef REISERQUOTA_DEBUG - reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); + reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); #endif if (DQUOT_ALLOC_SPACE_NODIRTY(inode, n_pasted_size)) { @@ -2048,7 +2048,7 @@ error_out: /* this also releases the path */ unfix_nodes(&s_paste_balance); #ifdef REISERQUOTA_DEBUG - reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); + reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); #endif DQUOT_FREE_SPACE_NODIRTY(inode, n_pasted_size); return retval ; @@ -2081,7 +2081,7 @@ int reiserfs_insert_item(struct reiserfs quota_bytes = inode->i_sb->s_blocksize + UNFM_P_SIZE ; } #ifdef REISERQUOTA_DEBUG - reiserfs_debug (inode->i_sb, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); + reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); #endif /* We can't dirty inode here. It would be immediately written but * appropriate stat item isn't inserted yet... */ @@ -2127,7 +2127,7 @@ error_out: /* also releases the path */ unfix_nodes(&s_ins_balance); #ifdef REISERQUOTA_DEBUG - reiserfs_debug (th->t_super, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); + reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); #endif if (inode) DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes) ; _