All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] Re: [PATCH] Fix GFS2's use of do_div() in its quota calculations
       [not found] <20080711133955.17306.16816.stgit@warthog.procyon.org.uk>
@ 2008-07-11 14:26 ` Steven Whitehouse
  0 siblings, 0 replies; only message in thread
From: Steven Whitehouse @ 2008-07-11 14:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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;
> 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-11 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080711133955.17306.16816.stgit@warthog.procyon.org.uk>
2008-07-11 14:26 ` [Cluster-devel] Re: [PATCH] Fix GFS2's use of do_div() in its quota calculations Steven Whitehouse

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.