Blame SOURCES/quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch

ecf77e
From d7694c952073bf2ebb852014d9f979b5e3e7c018 Mon Sep 17 00:00:00 2001
ecf77e
From: Jan Kara <jack@suse.cz>
ecf77e
Date: Mon, 28 May 2018 18:08:24 +0200
ecf77e
Subject: [PATCH] rpc: Fix wrong limit for space usage
ecf77e
MIME-Version: 1.0
ecf77e
Content-Type: text/plain; charset=UTF-8
ecf77e
Content-Transfer-Encoding: 8bit
ecf77e
ecf77e
Limit of maximum allowable space usage for RPC transfer was wrongly set
ecf77e
to ~4GB instead of ~4TB due to overflow in constant initialization. Fix
ecf77e
it.
ecf77e
ecf77e
Signed-off-by: Jan Kara <jack@suse.cz>
ecf77e
Signed-off-by: Petr Písař <ppisar@redhat.com>
ecf77e
---
ecf77e
 quotaio_rpc.c | 3 ++-
ecf77e
 1 file changed, 2 insertions(+), 1 deletion(-)
ecf77e
ecf77e
diff --git a/quotaio_rpc.c b/quotaio_rpc.c
ecf77e
index 6f25144..edc1e9f 100644
ecf77e
--- a/quotaio_rpc.c
ecf77e
+++ b/quotaio_rpc.c
ecf77e
@@ -33,7 +33,8 @@ static int rpc_init_io(struct quota_handle *h)
ecf77e
 #ifdef RPC
ecf77e
 	h->qh_info.dqi_max_b_limit = ~(uint32_t)0;
ecf77e
 	h->qh_info.dqi_max_i_limit = ~(uint32_t)0;
ecf77e
-	h->qh_info.dqi_max_b_usage = (~(uint32_t)0) << QUOTABLOCK_BITS;
ecf77e
+	h->qh_info.dqi_max_b_usage = ((uint64_t)(~(uint32_t)0))
ecf77e
+							 << QUOTABLOCK_BITS;
ecf77e
 	h->qh_info.dqi_max_i_usage = ~(uint32_t)0;
ecf77e
 	return 0;
ecf77e
 #else
ecf77e
-- 
ecf77e
2.14.3
ecf77e