diff options
Diffstat (limited to 'fs/ext3/xattr.c')
-rw-r--r-- | fs/ext3/xattr.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index e8d60bf6b7df..1ba515de5a75 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c | |||
@@ -225,7 +225,7 @@ ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, | |||
225 | error = -ENODATA; | 225 | error = -ENODATA; |
226 | if (!EXT3_I(inode)->i_file_acl) | 226 | if (!EXT3_I(inode)->i_file_acl) |
227 | goto cleanup; | 227 | goto cleanup; |
228 | ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); | 228 | ea_idebug(inode, "reading block %u", EXT3_I(inode)->i_file_acl); |
229 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); | 229 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); |
230 | if (!bh) | 230 | if (!bh) |
231 | goto cleanup; | 231 | goto cleanup; |
@@ -233,7 +233,7 @@ ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, | |||
233 | atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); | 233 | atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); |
234 | if (ext3_xattr_check_block(bh)) { | 234 | if (ext3_xattr_check_block(bh)) { |
235 | bad_block: ext3_error(inode->i_sb, __FUNCTION__, | 235 | bad_block: ext3_error(inode->i_sb, __FUNCTION__, |
236 | "inode %ld: bad block %d", inode->i_ino, | 236 | "inode %ld: bad block %u", inode->i_ino, |
237 | EXT3_I(inode)->i_file_acl); | 237 | EXT3_I(inode)->i_file_acl); |
238 | error = -EIO; | 238 | error = -EIO; |
239 | goto cleanup; | 239 | goto cleanup; |
@@ -366,7 +366,7 @@ ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) | |||
366 | error = 0; | 366 | error = 0; |
367 | if (!EXT3_I(inode)->i_file_acl) | 367 | if (!EXT3_I(inode)->i_file_acl) |
368 | goto cleanup; | 368 | goto cleanup; |
369 | ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); | 369 | ea_idebug(inode, "reading block %u", EXT3_I(inode)->i_file_acl); |
370 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); | 370 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); |
371 | error = -EIO; | 371 | error = -EIO; |
372 | if (!bh) | 372 | if (!bh) |
@@ -375,7 +375,7 @@ ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) | |||
375 | atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); | 375 | atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); |
376 | if (ext3_xattr_check_block(bh)) { | 376 | if (ext3_xattr_check_block(bh)) { |
377 | ext3_error(inode->i_sb, __FUNCTION__, | 377 | ext3_error(inode->i_sb, __FUNCTION__, |
378 | "inode %ld: bad block %d", inode->i_ino, | 378 | "inode %ld: bad block %u", inode->i_ino, |
379 | EXT3_I(inode)->i_file_acl); | 379 | EXT3_I(inode)->i_file_acl); |
380 | error = -EIO; | 380 | error = -EIO; |
381 | goto cleanup; | 381 | goto cleanup; |
@@ -647,7 +647,7 @@ ext3_xattr_block_find(struct inode *inode, struct ext3_xattr_info *i, | |||
647 | le32_to_cpu(BHDR(bs->bh)->h_refcount)); | 647 | le32_to_cpu(BHDR(bs->bh)->h_refcount)); |
648 | if (ext3_xattr_check_block(bs->bh)) { | 648 | if (ext3_xattr_check_block(bs->bh)) { |
649 | ext3_error(sb, __FUNCTION__, | 649 | ext3_error(sb, __FUNCTION__, |
650 | "inode %ld: bad block %d", inode->i_ino, | 650 | "inode %ld: bad block %u", inode->i_ino, |
651 | EXT3_I(inode)->i_file_acl); | 651 | EXT3_I(inode)->i_file_acl); |
652 | error = -EIO; | 652 | error = -EIO; |
653 | goto cleanup; | 653 | goto cleanup; |
@@ -792,11 +792,12 @@ inserted: | |||
792 | get_bh(new_bh); | 792 | get_bh(new_bh); |
793 | } else { | 793 | } else { |
794 | /* We need to allocate a new block */ | 794 | /* We need to allocate a new block */ |
795 | int goal = le32_to_cpu( | 795 | ext3_fsblk_t goal = le32_to_cpu( |
796 | EXT3_SB(sb)->s_es->s_first_data_block) + | 796 | EXT3_SB(sb)->s_es->s_first_data_block) + |
797 | EXT3_I(inode)->i_block_group * | 797 | (ext3_fsblk_t)EXT3_I(inode)->i_block_group * |
798 | EXT3_BLOCKS_PER_GROUP(sb); | 798 | EXT3_BLOCKS_PER_GROUP(sb); |
799 | int block = ext3_new_block(handle, inode, goal, &error); | 799 | ext3_fsblk_t block = ext3_new_block(handle, inode, |
800 | goal, &error); | ||
800 | if (error) | 801 | if (error) |
801 | goto cleanup; | 802 | goto cleanup; |
802 | ea_idebug(inode, "creating block %d", block); | 803 | ea_idebug(inode, "creating block %d", block); |
@@ -847,7 +848,7 @@ cleanup_dquot: | |||
847 | 848 | ||
848 | bad_block: | 849 | bad_block: |
849 | ext3_error(inode->i_sb, __FUNCTION__, | 850 | ext3_error(inode->i_sb, __FUNCTION__, |
850 | "inode %ld: bad block %d", inode->i_ino, | 851 | "inode %ld: bad block %u", inode->i_ino, |
851 | EXT3_I(inode)->i_file_acl); | 852 | EXT3_I(inode)->i_file_acl); |
852 | goto cleanup; | 853 | goto cleanup; |
853 | 854 | ||
@@ -1076,14 +1077,14 @@ ext3_xattr_delete_inode(handle_t *handle, struct inode *inode) | |||
1076 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); | 1077 | bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); |
1077 | if (!bh) { | 1078 | if (!bh) { |
1078 | ext3_error(inode->i_sb, __FUNCTION__, | 1079 | ext3_error(inode->i_sb, __FUNCTION__, |
1079 | "inode %ld: block %d read error", inode->i_ino, | 1080 | "inode %ld: block %u read error", inode->i_ino, |
1080 | EXT3_I(inode)->i_file_acl); | 1081 | EXT3_I(inode)->i_file_acl); |
1081 | goto cleanup; | 1082 | goto cleanup; |
1082 | } | 1083 | } |
1083 | if (BHDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || | 1084 | if (BHDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || |
1084 | BHDR(bh)->h_blocks != cpu_to_le32(1)) { | 1085 | BHDR(bh)->h_blocks != cpu_to_le32(1)) { |
1085 | ext3_error(inode->i_sb, __FUNCTION__, | 1086 | ext3_error(inode->i_sb, __FUNCTION__, |
1086 | "inode %ld: bad block %d", inode->i_ino, | 1087 | "inode %ld: bad block %u", inode->i_ino, |
1087 | EXT3_I(inode)->i_file_acl); | 1088 | EXT3_I(inode)->i_file_acl); |
1088 | goto cleanup; | 1089 | goto cleanup; |
1089 | } | 1090 | } |
@@ -1210,11 +1211,11 @@ again: | |||
1210 | bh = sb_bread(inode->i_sb, ce->e_block); | 1211 | bh = sb_bread(inode->i_sb, ce->e_block); |
1211 | if (!bh) { | 1212 | if (!bh) { |
1212 | ext3_error(inode->i_sb, __FUNCTION__, | 1213 | ext3_error(inode->i_sb, __FUNCTION__, |
1213 | "inode %ld: block %ld read error", | 1214 | "inode %ld: block %lu read error", |
1214 | inode->i_ino, (unsigned long) ce->e_block); | 1215 | inode->i_ino, (unsigned long) ce->e_block); |
1215 | } else if (le32_to_cpu(BHDR(bh)->h_refcount) >= | 1216 | } else if (le32_to_cpu(BHDR(bh)->h_refcount) >= |
1216 | EXT3_XATTR_REFCOUNT_MAX) { | 1217 | EXT3_XATTR_REFCOUNT_MAX) { |
1217 | ea_idebug(inode, "block %ld refcount %d>=%d", | 1218 | ea_idebug(inode, "block %lu refcount %d>=%d", |
1218 | (unsigned long) ce->e_block, | 1219 | (unsigned long) ce->e_block, |
1219 | le32_to_cpu(BHDR(bh)->h_refcount), | 1220 | le32_to_cpu(BHDR(bh)->h_refcount), |
1220 | EXT3_XATTR_REFCOUNT_MAX); | 1221 | EXT3_XATTR_REFCOUNT_MAX); |