cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [PATCH] Fix GFS2's use of do_div() in its quota calculations
Date: Fri, 11 Jul 2008 15:26:05 +0100	[thread overview]
Message-ID: <1215786365.4011.227.camel@quoit> (raw)
In-Reply-To: <20080711133955.17306.16816.stgit@warthog.procyon.org.uk>

Hi,

Now in the GFS2 -nmw git tree. Thanks,

Steve.

On Fri, 2008-07-11 at 14:39 +0100, David Howells wrote:
> Fix GFS2's need_sync()'s use of do_div() on an s64 by using div_s64() instead.
> 
> This does assume that gt_quota_scale_den can be cast to an s32.
> 
> This was introduced by patch b3b94faa5fe5968827ba0640ee9fba4b3e7f736e.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  fs/gfs2/quota.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
> index 56aaf91..3e073f5 100644
> --- a/fs/gfs2/quota.c
> +++ b/fs/gfs2/quota.c
> @@ -904,7 +904,7 @@ static int need_sync(struct gfs2_quota_data *qd)
>  		do_sync = 0;
>  	else {
>  		value *= gfs2_jindex_size(sdp) * num;
> -		do_div(value, den);
> +		value = div_s64(value, den);
>  		value += (s64)be64_to_cpu(qd->qd_qb.qb_value);
>  		if (value < (s64)be64_to_cpu(qd->qd_qb.qb_limit))
>  			do_sync = 0;
> 



           reply	other threads:[~2008-07-11 14:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20080711133955.17306.16816.stgit@warthog.procyon.org.uk>]

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=1215786365.4011.227.camel@quoit \
    --to=swhiteho@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).