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

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