public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Register ext[23] support only after successful ext4 registration
@ 2022-08-10 20:20 Marc Aurèle La France
  2022-09-29 14:20 ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Aurèle La France @ 2022-08-10 20:20 UTC (permalink / raw)
  To: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

Register ext4 as a "replacement" for ext2 and ext3 only after ext4 itself has
been successfully registered.  As a side effect, this allows
unregister_as_ext[23]() to be inlined.

This change is not eligible for stable@.

Please Reply-To-All.

Thanks and have a great day.

Marc.

Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>

diff -aNpRruz -X /etc/diff.excludes linux-5.17.1/fs/ext4/super.c devel-5.17.1/fs/ext4/super.c
--- linux-5.17.1/fs/ext4/super.c	2022-03-28 02:03:22.000000000 -0600
+++ devel-5.17.1/fs/ext4/super.c	2022-03-28 07:14:10.799008309 -0600
@@ -7123,16 +7123,14 @@ static int __init ext4_init_fs(void)
 	if (err)
 		goto out05;

-	register_as_ext3();
-	register_as_ext2();
 	err = register_filesystem(&ext4_fs_type);
 	if (err)
 		goto out;

+	register_as_ext3();
+	register_as_ext2();
 	return 0;
 out:
-	unregister_as_ext2();
-	unregister_as_ext3();
 	ext4_fc_destroy_dentry_cache();
 out05:
 	destroy_inodecache();

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-30  3:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 20:20 [PATCH] ext4: Register ext[23] support only after successful ext4 registration Marc Aurèle La France
2022-09-29 14:20 ` Theodore Ts'o
2022-09-30  3:45   ` Marc Aurèle La France

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox