Skip to content

Instantly share code, notes, and snippets.

@edwintorok
Created April 13, 2011 16:16
Show Gist options
  • Save edwintorok/917856 to your computer and use it in GitHub Desktop.
Save edwintorok/917856 to your computer and use it in GitHub Desktop.
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index d22aa31..8f593fb 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -470,7 +470,8 @@ xfs_qm_dqtobp(
xfs_dqid_t id = be32_to_cpu(dqp->q_core.d_id);
xfs_trans_t *tp = (tpp ? *tpp : NULL);
- dqp->q_fileoffset = (xfs_fileoff_t)id / mp->m_quotainfo->qi_dqperchunk;
+ dqp->q_fileoffset = (xfs_fileoff_t)id;
+ do_div(dqp->q_fileoffset, mp->m_quotainfo->qi_dqperchunk);
xfs_ilock(quotip, XFS_ILOCK_SHARED);
if (XFS_IS_THIS_QUOTA_OFF(dqp)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment