Skip to content

Instantly share code, notes, and snippets.

@dileks
Created April 13, 2011 15:24
Show Gist options
  • Select an option

  • Save dileks/917740 to your computer and use it in GitHub Desktop.

Select an option

Save dileks/917740 to your computer and use it in GitHub Desktop.
Proposal patch by pipacs
BROKEN here:
...
LD .tmp_vmlinux1
fs/built-in.o: In function `xfs_qm_dqtobp':
fs/xfs/quota/xfs_dquot.c:(.text+0xb37a4): undefined reference to `__udivdi3'
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index d22aa31..fccd3d7 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -470,7 +470,7 @@ 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 = do_div(xfs_fileoff_t)id / 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