xfs
[Top] [All Lists]

[PATCH 12/14] xfs: kill xfs_qm_dqinit_core

To: xfs@xxxxxxxxxxx
Subject: [PATCH 12/14] xfs: kill xfs_qm_dqinit_core
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 31 Aug 2011 16:36:59 -0400
References: <20110831203647.455809764@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.48-1
Merge into it's only caller, which also obsoletes the comments.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: xfs/fs/xfs/xfs_dquot.c
===================================================================
--- xfs.orig/fs/xfs/xfs_dquot.c 2011-08-31 13:07:52.243389072 +0200
+++ xfs/fs/xfs/xfs_dquot.c      2011-08-31 13:09:36.613388405 +0200
@@ -155,24 +155,6 @@ xfs_qm_dqdestroy(
 }
 
 /*
- * This is what a 'fresh' dquot inside a dquot chunk looks like on disk.
- */
-STATIC void
-xfs_qm_dqinit_core(
-       xfs_dqid_t      id,
-       uint            type,
-       xfs_dqblk_t     *d)
-{
-       /*
-        * Caller has zero'd the entire dquot 'chunk' already.
-        */
-       d->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
-       d->dd_diskdq.d_version = XFS_DQUOT_VERSION;
-       d->dd_diskdq.d_id = cpu_to_be32(id);
-       d->dd_diskdq.d_flags = type;
-}
-
-/*
  * If default limits are in force, push them into the dquot now.
  * We overwrite the dquot limits only if they are zero and this
  * is not the root dquot.
@@ -328,8 +310,13 @@ xfs_qm_init_dquot_blk(
        curid = id - (id % q->qi_dqperchunk);
        ASSERT(curid >= 0);
        memset(d, 0, BBTOB(q->qi_dqchunklen));
-       for (i = 0; i < q->qi_dqperchunk; i++, d++, curid++)
-               xfs_qm_dqinit_core(curid, type, d);
+       for (i = 0; i < q->qi_dqperchunk; i++, d++, curid++) {
+               d->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
+               d->dd_diskdq.d_version = XFS_DQUOT_VERSION;
+               d->dd_diskdq.d_id = cpu_to_be32(curid);
+               d->dd_diskdq.d_flags = type;
+       }
+
        xfs_trans_dquot_buf(tp, bp,
                            (type & XFS_DQ_USER ? XFS_BLF_UDQUOT_BUF :
                            ((type & XFS_DQ_PROJ) ? XFS_BLF_PDQUOT_BUF :

<Prev in Thread] Current Thread [Next in Thread>