Blame SOURCES/xfsprogs-5.8.0-xfs_db-short-circuit-type_f-if-type-is-unchanged.patch

1569e6
From 7b4a7b3f6bce91be45b54fc68e169cb756dc8c74 Mon Sep 17 00:00:00 2001
1569e6
From: Eric Sandeen <sandeen@redhat.com>
1569e6
Date: Mon, 24 Aug 2020 12:47:47 -0400
1569e6
Subject: [PATCH] xfs_db: short circuit type_f if type is unchanged
1569e6
1569e6
There's no reason to go through the type change code if the
1569e6
type has not been changed.
1569e6
1569e6
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
1569e6
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
1569e6
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
1569e6
---
1569e6
 db/type.c | 2 ++
1569e6
 1 file changed, 2 insertions(+)
1569e6
1569e6
diff --git a/db/type.c b/db/type.c
1569e6
index 3cb1e868..572ac6d6 100644
1569e6
--- a/db/type.c
1569e6
+++ b/db/type.c
1569e6
@@ -216,6 +216,8 @@ type_f(
1569e6
 		tt = findtyp(argv[1]);
1569e6
 		if (tt == NULL) {
1569e6
 			dbprintf(_("no such type %s\n"), argv[1]);
1569e6
+		} else if (iocur_top->typ == tt) {
1569e6
+			return 0;
1569e6
 		} else {
1569e6
 			if (iocur_top->typ == NULL)
1569e6
 				dbprintf(_("no current object\n"));
1569e6
-- 
1569e6
2.29.2
1569e6