diff options
author | David Howells <dhowells@redhat.com> | 2008-07-11 09:39:56 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-07-11 09:35:01 -0400 |
commit | 4abaca17e758e3326c96ced88b2cd9b7b84922f6 (patch) | |
tree | 920bcf9d988d3141d5a906ad683b8903ef074068 /fs | |
parent | a93a6ce24215c69126c88f9c488afa50a168e0ca (diff) |
[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 <dhowells@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | 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 56aaf915c59a..3e073f5144fa 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -904,7 +904,7 @@ static int need_sync(struct gfs2_quota_data *qd) | |||
904 | do_sync = 0; | 904 | do_sync = 0; |
905 | else { | 905 | else { |
906 | value *= gfs2_jindex_size(sdp) * num; | 906 | value *= gfs2_jindex_size(sdp) * num; |
907 | do_div(value, den); | 907 | value = div_s64(value, den); |
908 | value += (s64)be64_to_cpu(qd->qd_qb.qb_value); | 908 | value += (s64)be64_to_cpu(qd->qd_qb.qb_value); |
909 | if (value < (s64)be64_to_cpu(qd->qd_qb.qb_limit)) | 909 | if (value < (s64)be64_to_cpu(qd->qd_qb.qb_limit)) |
910 | do_sync = 0; | 910 | do_sync = 0; |