public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, bfoster@redhat.com
Subject: Re: [PATCH] xfs: fix refactor quota limits initialization
Date: Wed, 16 May 2018 11:08:41 +1000	[thread overview]
Message-ID: <20180516010841.GO23861@dastard> (raw)
In-Reply-To: <20180516010108.GA23858@magnolia>

On Tue, May 15, 2018 at 06:01:08PM -0700, Darrick J. Wong wrote:
> dquot warning fields are be16, not be32.  Fix this mistake.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  fs/xfs/xfs_qm.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index 913d46d01bfc..c3e014bfc848 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -636,11 +636,11 @@ xfs_qm_init_timelimits(
>  	if (ddqp->d_rtbtimer)
>  		qinf->qi_rtbtimelimit = be32_to_cpu(ddqp->d_rtbtimer);
>  	if (ddqp->d_bwarns)
> -		qinf->qi_bwarnlimit = be32_to_cpu(ddqp->d_bwarns);
> +		qinf->qi_bwarnlimit = be16_to_cpu(ddqp->d_bwarns);
>  	if (ddqp->d_iwarns)
> -		qinf->qi_iwarnlimit = be32_to_cpu(ddqp->d_iwarns);
> +		qinf->qi_iwarnlimit = be16_to_cpu(ddqp->d_iwarns);
>  	if (ddqp->d_rtbwarns)
> -		qinf->qi_rtbwarnlimit = be32_to_cpu(ddqp->d_rtbwarns);
> +		qinf->qi_rtbwarnlimit = be16_to_cpu(ddqp->d_rtbwarns);

Looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

FWIW, this points out that we need to start de-typedef-ing the quota
code as well clean it up. We've been pretty good about this in the
rest of the XFS code over the years, perhaps it's time for the quota
code to catch up?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2018-05-16  1:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  1:01 [PATCH] xfs: fix refactor quota limits initialization Darrick J. Wong
2018-05-16  1:08 ` Dave Chinner [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=20180516010841.GO23861@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox