diff options
author | Jan Kara <jack@suse.cz> | 2018-05-28 18:08:24 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-05-28 18:08:24 +0200 |
commit | d7694c952073bf2ebb852014d9f979b5e3e7c018 (patch) | |
tree | cfb2d6a754173f487db66d17afa80d367438b567 | |
parent | 77440bd389425a9a79265f52783e6d39535f199f (diff) |
rpc: Fix wrong limit for space usage
Limit of maximum allowable space usage for RPC transfer was wrongly set
to ~4GB instead of ~4TB due to overflow in constant initialization. Fix
it.
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quotaio_rpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/quotaio_rpc.c b/quotaio_rpc.c index 6f25144..edc1e9f 100644 --- a/quotaio_rpc.c +++ b/quotaio_rpc.c @@ -33,7 +33,8 @@ static int rpc_init_io(struct quota_handle *h) #ifdef RPC h->qh_info.dqi_max_b_limit = ~(uint32_t)0; h->qh_info.dqi_max_i_limit = ~(uint32_t)0; - h->qh_info.dqi_max_b_usage = (~(uint32_t)0) << QUOTABLOCK_BITS; + h->qh_info.dqi_max_b_usage = ((uint64_t)(~(uint32_t)0)) + << QUOTABLOCK_BITS; h->qh_info.dqi_max_i_usage = ~(uint32_t)0; return 0; #else |