Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df32b334 authored by Tao Ma's avatar Tao Ma Committed by Mark Fasheh
Browse files

ocfs2/quota: sparse fixes for quota



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: default avatarTao Ma <tao.ma@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent e35ff98f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -988,7 +988,7 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
		goto out_trans;
		goto out_trans;
	}
	}
	lock_buffer(bh);
	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,
	memset(dchunk->dqc_bitmap, 0,
	       sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
	       sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
	       OCFS2_QBLK_RESERVED_SPACE);
	       OCFS2_QBLK_RESERVED_SPACE);
@@ -1110,7 +1110,7 @@ static struct ocfs2_quota_chunk *ocfs2_extend_local_quota_file(
	return ERR_PTR(status);
	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;
	int *offset = private;
	struct ocfs2_local_disk_chunk *dchunk;
	struct ocfs2_local_disk_chunk *dchunk;