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

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