Skip to content

Commit

Permalink
ocfs2/quota: sparse fixes for quota
Browse files Browse the repository at this point in the history
Fix 2 minor things in quota. They are both found by sparse check.
1. an endian bug in ocfs2_local_quota_add_chunk.
2. change olq_alloc_dquot to static.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
Tao Ma authored and Mark Fasheh committed Jan 5, 2009
1 parent e35ff98 commit df32b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ocfs2/quota_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
goto out_trans;
}
lock_buffer(bh);
dchunk->dqc_free = ol_quota_entries_per_block(sb);
dchunk->dqc_free = cpu_to_le32(ol_quota_entries_per_block(sb));
memset(dchunk->dqc_bitmap, 0,
sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
OCFS2_QBLK_RESERVED_SPACE);
Expand Down Expand Up @@ -1110,7 +1110,7 @@ static struct ocfs2_quota_chunk *ocfs2_extend_local_quota_file(
return ERR_PTR(status);
}

void olq_alloc_dquot(struct buffer_head *bh, void *private)
static void olq_alloc_dquot(struct buffer_head *bh, void *private)
{
int *offset = private;
struct ocfs2_local_disk_chunk *dchunk;
Expand Down

0 comments on commit df32b33

Please sign in to comment.