From 340909fd0019916eaebae13abf00b3bf6816f758 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Mon, 26 Sep 2016 19:03:52 +0000
Subject: [PATCH] quota: move Q_QUOTAON handling to subcommand switch statement

* quota.c (SYS_FUNC(quotactl)): Move handling of Q_QUOTAON subcommand ...
(decode_cmd_data): ... here.
---
 quota.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/quota.c b/quota.c
index c28480f4..e08bd5fe 100644
--- a/quota.c
+++ b/quota.c
@@ -166,6 +166,12 @@ decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, unsigned long data)
 	case Q_SYNC:
 	case Q_XQUOTASYNC:
 		break;
+	case Q_QUOTAON:
+		tprints(", ");
+		printxval(quota_formats, id, "QFMT_VFS_???");
+		tprints(", ");
+		printpath(tcp, data);
+		break;
 	case Q_GETQUOTA:
 		if (entering(tcp)) {
 			printuid(", ", id);
@@ -457,14 +463,6 @@ SYS_FUNC(quotactl)
 		printxval(quotatypes, type, "???QUOTA");
 		tprints("), ");
 		printpath(tcp, tcp->u_arg[1]);
-		switch (cmd) {
-			case Q_QUOTAON:
-				tprints(", ");
-				printxval(quota_formats, id, "QFMT_VFS_???");
-				tprints(", ");
-				printpath(tcp, tcp->u_arg[3]);
-				return RVAL_DECODED;
-		}
 	}
 	return decode_cmd_data(tcp, id, cmd, tcp->u_arg[3]);
 }
-- 
2.40.0