diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 2ce562cb5c78..fcfafaa41a7d 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -154,24 +154,6 @@ xfs_qm_dqdestroy( | |||
154 | } | 154 | } |
155 | 155 | ||
156 | /* | 156 | /* |
157 | * This is what a 'fresh' dquot inside a dquot chunk looks like on disk. | ||
158 | */ | ||
159 | STATIC void | ||
160 | xfs_qm_dqinit_core( | ||
161 | xfs_dqid_t id, | ||
162 | uint type, | ||
163 | xfs_dqblk_t *d) | ||
164 | { | ||
165 | /* | ||
166 | * Caller has zero'd the entire dquot 'chunk' already. | ||
167 | */ | ||
168 | d->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC); | ||
169 | d->dd_diskdq.d_version = XFS_DQUOT_VERSION; | ||
170 | d->dd_diskdq.d_id = cpu_to_be32(id); | ||
171 | d->dd_diskdq.d_flags = type; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * If default limits are in force, push them into the dquot now. | 157 | * If default limits are in force, push them into the dquot now. |
176 | * We overwrite the dquot limits only if they are zero and this | 158 | * We overwrite the dquot limits only if they are zero and this |
177 | * is not the root dquot. | 159 | * is not the root dquot. |
@@ -327,8 +309,13 @@ xfs_qm_init_dquot_blk( | |||
327 | curid = id - (id % q->qi_dqperchunk); | 309 | curid = id - (id % q->qi_dqperchunk); |
328 | ASSERT(curid >= 0); | 310 | ASSERT(curid >= 0); |
329 | memset(d, 0, BBTOB(q->qi_dqchunklen)); | 311 | memset(d, 0, BBTOB(q->qi_dqchunklen)); |
330 | for (i = 0; i < q->qi_dqperchunk; i++, d++, curid++) | 312 | for (i = 0; i < q->qi_dqperchunk; i++, d++, curid++) { |
331 | xfs_qm_dqinit_core(curid, type, d); | 313 | d->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC); |
314 | d->dd_diskdq.d_version = XFS_DQUOT_VERSION; | ||
315 | d->dd_diskdq.d_id = cpu_to_be32(curid); | ||
316 | d->dd_diskdq.d_flags = type; | ||
317 | } | ||
318 | |||
332 | xfs_trans_dquot_buf(tp, bp, | 319 | xfs_trans_dquot_buf(tp, bp, |
333 | (type & XFS_DQ_USER ? XFS_BLF_UDQUOT_BUF : | 320 | (type & XFS_DQ_USER ? XFS_BLF_UDQUOT_BUF : |
334 | ((type & XFS_DQ_PROJ) ? XFS_BLF_PDQUOT_BUF : | 321 | ((type & XFS_DQ_PROJ) ? XFS_BLF_PDQUOT_BUF : |