Skip to content

Commit

Permalink
ocfs2: Fix some printk() warnings.
Browse files Browse the repository at this point in the history
The old %llu vs u64 battle.  Cast them correctly.

Signed-off-by: Joel Becker <[email protected]>
  • Loading branch information
Joel Becker committed Apr 21, 2009
1 parent 0fba813 commit 5b09b50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
9 changes: 5 additions & 4 deletions fs/ocfs2/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,

/* If the inode allocator bit is clear, this inode must be stale */
if (!set) {
mlog(0, "inode %llu suballoc bit is clear\n", blkno);
mlog(0, "inode %llu suballoc bit is clear\n",
(unsigned long long)blkno);
status = -ESTALE;
goto unlock_nfs_sync;
}
Expand All @@ -114,7 +115,7 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,
if (status < 0) {
if (status == -ESTALE) {
mlog(0, "stale inode ino: %llu generation: %u\n",
blkno, handle->ih_generation);
(unsigned long long)blkno, handle->ih_generation);
}
result = ERR_PTR(status);
goto bail;
Expand All @@ -129,8 +130,8 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,
check_gen:
if (handle->ih_generation != inode->i_generation) {
iput(inode);
mlog(0, "stale inode ino: %llu generation: %u\n", blkno,
handle->ih_generation);
mlog(0, "stale inode ino: %llu generation: %u\n",
(unsigned long long)blkno, handle->ih_generation);
result = ERR_PTR(-ESTALE);
goto bail;
}
Expand Down
19 changes: 12 additions & 7 deletions fs/ocfs2/suballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,26 +2197,29 @@ static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno,
struct buffer_head *inode_bh = NULL;
struct ocfs2_dinode *inode_fe;

mlog_entry("blkno: %llu\n", blkno);
mlog_entry("blkno: %llu\n", (unsigned long long)blkno);

/* dirty read disk */
status = ocfs2_read_blocks_sync(osb, blkno, 1, &inode_bh);
if (status < 0) {
mlog(ML_ERROR, "read block %llu failed %d\n", blkno, status);
mlog(ML_ERROR, "read block %llu failed %d\n",
(unsigned long long)blkno, status);
goto bail;
}

inode_fe = (struct ocfs2_dinode *) inode_bh->b_data;
if (!OCFS2_IS_VALID_DINODE(inode_fe)) {
mlog(ML_ERROR, "invalid inode %llu requested\n", blkno);
mlog(ML_ERROR, "invalid inode %llu requested\n",
(unsigned long long)blkno);
status = -EINVAL;
goto bail;
}

if (le16_to_cpu(inode_fe->i_suballoc_slot) != (u16)OCFS2_INVALID_SLOT &&
(u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) {
mlog(ML_ERROR, "inode %llu has invalid suballoc slot %u\n",
blkno, (u32)le16_to_cpu(inode_fe->i_suballoc_slot));
(unsigned long long)blkno,
(u32)le16_to_cpu(inode_fe->i_suballoc_slot));
status = -EINVAL;
goto bail;
}
Expand Down Expand Up @@ -2251,7 +2254,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,
u64 bg_blkno;
int status;

mlog_entry("blkno: %llu bit: %u\n", blkno, (unsigned int)bit);
mlog_entry("blkno: %llu bit: %u\n", (unsigned long long)blkno,
(unsigned int)bit);

alloc_fe = (struct ocfs2_dinode *)alloc_bh->b_data;
if ((bit + 1) > ocfs2_bits_per_group(&alloc_fe->id2.i_chain)) {
Expand All @@ -2266,7 +2270,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,
status = ocfs2_read_group_descriptor(suballoc, alloc_fe, bg_blkno,
&group_bh);
if (status < 0) {
mlog(ML_ERROR, "read group %llu failed %d\n", bg_blkno, status);
mlog(ML_ERROR, "read group %llu failed %d\n",
(unsigned long long)bg_blkno, status);
goto bail;
}

Expand Down Expand Up @@ -2300,7 +2305,7 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res)
struct inode *inode_alloc_inode;
struct buffer_head *alloc_bh = NULL;

mlog_entry("blkno: %llu", blkno);
mlog_entry("blkno: %llu", (unsigned long long)blkno);

status = ocfs2_get_suballoc_slot_bit(osb, blkno, &suballoc_slot,
&suballoc_bit);
Expand Down

0 comments on commit 5b09b50

Please sign in to comment.