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

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