From: Bill O'Donnell <billodo@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH V2] xfs: remove use of do_div with 32-bit dividend in quota debug code
Date: Wed, 19 Apr 2017 15:23:52 -0500 [thread overview]
Message-ID: <20170419202352.GB12343@redhat.com> (raw)
In-Reply-To: <e54544bf-9662-fa91-40b6-69a284aa66e2@sandeen.net>
On Wed, Apr 19, 2017 at 02:41:07PM -0500, Eric Sandeen wrote:
> The kbuild test robot caught this; in debug code we have another
> caller of do_div with a 32-bit dividend (j) which is caught now
> that we are using the kernel-supplied do_div.
>
> None of the values used here are 64-bit; just use simple division.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
reviewed again, this time with proper email sig. ;)
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> ---
>
> V2: now with less actual 64-bit division!
>
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index b669b12..6b42db4 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -851,8 +851,8 @@ struct xfs_qm_isolate {
> * started afresh by xfs_qm_quotacheck.
> */
> #ifdef DEBUG
> - j = XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB);
> - do_div(j, sizeof(xfs_dqblk_t));
> + j = (int)XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) /
> + sizeof(xfs_dqblk_t);
> ASSERT(mp->m_quotainfo->qi_dqperchunk == j);
> #endif
> dqb = bp->b_addr;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-04-19 20:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-15 14:46 [PATCH] xfs: remove use of do_div with 32-bit dividend in quota debug code Eric Sandeen
2017-04-17 18:27 ` Bill O'Donnell
2017-04-17 18:59 ` Darrick J. Wong
2017-04-19 19:29 ` Eric Sandeen
2017-04-19 19:41 ` [PATCH V2] " Eric Sandeen
2017-04-19 20:01 ` Darrick J. Wong
2017-04-19 20:21 ` Bill O'Donnell
2017-04-19 20:23 ` Bill O'Donnell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170419202352.GB12343@redhat.com \
--to=billodo@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.