]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ocfs2/quota: sparse fixes for quota
authorTao Ma <tao.ma@oracle.com>
Mon, 24 Nov 2008 23:21:36 +0000 (07:21 +0800)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:40:26 +0000 (08:40 -0800)
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>
fs/ocfs2/quota_local.c

index b5ddb22e627828d391799422abd7b77d71c17743..d451b715aefebcf53ea68e3e505403ed1e91dbd2 100644 (file)
@@ -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);
@@ -1110,7 +1110,7 @@ out:
        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;