diff --git a/SOURCES/quota-4.01-quota-1-Distinguish-between-none-quota-limits-and-no.patch b/SOURCES/quota-4.01-quota-1-Distinguish-between-none-quota-limits-and-no.patch
new file mode 100644
index 0000000..f8ab233
--- /dev/null
+++ b/SOURCES/quota-4.01-quota-1-Distinguish-between-none-quota-limits-and-no.patch
@@ -0,0 +1,74 @@
+From d9e5d8ee642d97c6223d4b7536f33db0e9834a85 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Mon, 16 Jul 2018 11:22:53 +0200
+Subject: [PATCH] quota(1): Distinguish between none quota limits and no
+ allocated resources
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If a user does not occupies any space or inodes on a file system but
+quota limits are set, quota(1) tool still reports "none":
+
+  # quota -u test
+  Disk quotas for user test (uid 500): none
+
+That's because the tool skips printing details for file systems
+without any used resources but uses the shares the message with file
+system without any quota limits.
+
+This patch makes the distinction and changes "none" message into "no
+quota limits set" and "no limited resources used" respectively.
+
+Petr Písař: Ported to 4.01.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ quota.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/quota.c b/quota.c
+index 1befbde..7e1f25c 100644
+--- a/quota.c
++++ b/quota.c
+@@ -179,7 +179,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
+ 	char timebuf[MAXTIMELEN];
+ 	char name[MAXNAMELEN];
+ 	struct quota_handle **handles;
+-	int lines = 0, bover, iover, over;
++	int lines = 0, bover, iover, over, unlimited;
+ 	time_t now;
+ 
+ 	time(&now);
+@@ -191,11 +191,16 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
+ 		| ((flags & FL_NFSALL) ? MS_NFS_ALL : 0));
+ 	qlist = getprivs(id, handles, !!(flags & FL_QUIETREFUSE));
+ 	over = 0;
++	unlimited = 1;
+ 	for (q = qlist; q; q = q->dq_next) {
+ 		bover = iover = 0;
+-		if (!(flags & FL_VERBOSE) && !q->dq_dqb.dqb_isoftlimit && !q->dq_dqb.dqb_ihardlimit
+-		    && !q->dq_dqb.dqb_bsoftlimit && !q->dq_dqb.dqb_bhardlimit)
+-			continue;
++		if (!q->dq_dqb.dqb_isoftlimit && !q->dq_dqb.dqb_ihardlimit
++		    && !q->dq_dqb.dqb_bsoftlimit && !q->dq_dqb.dqb_bhardlimit) {
++			if (!(flags & FL_VERBOSE))
++				continue;
++		} else {
++			unlimited = 0;
++		}
+ 		msgi = NULL;
+ 		if (q->dq_dqb.dqb_ihardlimit && q->dq_dqb.dqb_curinodes >= q->dq_dqb.dqb_ihardlimit) {
+ 			msgi = _("File limit reached on");
+@@ -287,7 +292,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
+ 		}
+ 	}
+ 	if (!(flags & FL_QUIET) && !lines && qlist)
+-		heading(type, id, name, _("none"));
++		heading(type, id, name, unlimited ? _("none") : _("no limited resources used"));
+ 	freeprivs(qlist);
+ 	dispose_handle_list(handles);
+ 	return over > 0 ? 1 : 0;
+-- 
+2.14.4
+
diff --git a/SOURCES/quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch b/SOURCES/quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
new file mode 100644
index 0000000..5d4ed11
--- /dev/null
+++ b/SOURCES/quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
@@ -0,0 +1,35 @@
+From d7694c952073bf2ebb852014d9f979b5e3e7c018 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Mon, 28 May 2018 18:08:24 +0200
+Subject: [PATCH] rpc: Fix wrong limit for space usage
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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>
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ quotaio_rpc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+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
+-- 
+2.14.3
+
diff --git a/SPECS/quota.spec b/SPECS/quota.spec
index a45520e..7ffaccc 100644
--- a/SPECS/quota.spec
+++ b/SPECS/quota.spec
@@ -5,7 +5,7 @@ Name: quota
 Summary: System administration tools for monitoring users' disk usage
 Epoch: 1
 Version: 4.01
-Release: 17%{?dist}
+Release: 19%{?dist}
 # quota_nld.c, quotaio_xfs.h:       GPLv2
 # bylabel.c copied from util-linux: GPLv2+
 # svc_socket.c copied from glibc:   LGPLv2+
@@ -94,6 +94,12 @@ Patch28: quota-4.03-quotacheck-Deallocate-memory-after-direct-scanning.patch
 Patch29: quota-4.01-Properly-handle-signed-space-and-inode-values.patch
 # Bug #1517822, in upstream 4.02
 Patch30: quota-4.02-Fix-handling-of-space-and-inode-values.patch
+# Bug #1601109, proposed to upstream,
+# <https://sourceforge.net/p/linuxquota/bugs/128/>
+Patch31: quota-4.01-quota-1-Distinguish-between-none-quota-limits-and-no.patch
+# Fix current block usage limit in RPC client, bug #1697605,
+# in upstream after 4.04, <https://sourceforge.net/p/linuxquota/bugs/127/>
+Patch32: quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
 
 %description
 The quota package contains system administration tools for monitoring
@@ -195,6 +201,8 @@ Linux/UNIX environment.
 %patch28 -p1 -b .quotacheck_leak
 %patch29 -p1 -b .signed_values
 %patch30 -p1 -b .fix_signed_values
+%patch31 -p1 -b .nonequota
+%patch32 -p1
 
 #fix typos/mistakes in localized documentation
 for pofile in $(find ./po/*.p*)
@@ -319,6 +327,13 @@ echo '  systemd-sysv-convert --apply quota_nld'
 
 
 %changelog
+* Tue Apr 09 2019 Petr Pisar <ppisar@redhat.com> - 1:4.01-19
+- Fix current block usage limit in RPC client (bug #1697605)
+
+* Mon Jul 16 2018 Petr Pisar <ppisar@redhat.com> - 1:4.01-18
+- Distinguish between none quota limits and no allocated resources in quota(1)
+  tool (bug #1601109)
+
 * Mon Nov 27 2017 Petr Pisar <ppisar@redhat.com> - 1:4.01-17
 - Print negative quota values properly (bug #1517822)