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

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