Skip to content

Commit

Permalink
use do_div for this division to avoid an udivdi3 call by clang
Browse files Browse the repository at this point in the history
patch suggested by pipacs
  • Loading branch information
edwintorok committed Apr 13, 2011
1 parent 99603bb commit 198c34a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/quota/xfs_dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 198c34a

Please sign in to comment.