From: David Howells Date: Fri, 11 Jul 2008 13:39:56 +0000 (+0100) Subject: [GFS2] Fix GFS2's use of do_div() in its quota calculations X-Git-Tag: v2.6.27-rc1~1083^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4abaca17e758e3326c96ced88b2cd9b7b84922f6;p=linux-2.6 [GFS2] Fix GFS2's use of do_div() in its quota calculations 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 Signed-off-by: Steven Whitehouse --- diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 56aaf915c5..3e073f5144 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;