Commit d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_*
sysfs files") and commit 3f5f1f22ef10 ("Documentation/ABI: Mark
/sys/kernel/fadump_* sysfs files deprecated") moved the
/sys/kernel/fadump_* sysfs files to /sys/kernel/fadump/ and deprecated
the old files in 2019.

To maintain backward compatibility, symlinks were added at the old
locations so existing tools could still work. References [1][2] now use
the new sysfs interface, so we can safely remove the old symlinks.

Link: 
https://github.com/rhkdump/kdump-utils/commit/fc7c65312a5bef115ce40818bf43ddd3b01b8958
 [1]
Link: 
https://github.com/openSUSE/kdump/commit/c274a22ff5f326c8afaa7bba60bd1b86abfc4fab
 [2]

Cc: Hari Bathini <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Mahesh Salgaonkar <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Ritesh Harjani (IBM) <[email protected]>
Cc: Shivang Upadhyay <[email protected]>
Cc: [email protected]
Signed-off-by: Sourabh Jain <[email protected]>
---
 arch/powerpc/kernel/fadump.c | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 4ebc333dd786..4348466260cf 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1604,43 +1604,7 @@ static void __init fadump_init_files(void)
                pr_err("sysfs group creation failed (%d), unregistering FADump",
                       rc);
                unregister_fadump();
-               return;
-       }
-
-       /*
-        * The FADump sysfs are moved from kernel_kobj to fadump_kobj need to
-        * create symlink at old location to maintain backward compatibility.
-        *
-        *      - fadump_enabled -> fadump/enabled
-        *      - fadump_registered -> fadump/registered
-        *      - fadump_release_mem -> fadump/release_mem
-        */
-       rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj, fadump_kobj,
-                                                 "enabled", "fadump_enabled");
-       if (rc) {
-               pr_err("unable to create fadump_enabled symlink (%d)", rc);
-               return;
-       }
-
-       rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj, fadump_kobj,
-                                                 "registered",
-                                                 "fadump_registered");
-       if (rc) {
-               pr_err("unable to create fadump_registered symlink (%d)", rc);
-               sysfs_remove_link(kernel_kobj, "fadump_enabled");
-               return;
        }
-
-       if (fw_dump.dump_active) {
-               rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj,
-                                                         fadump_kobj,
-                                                         "release_mem",
-                                                         "fadump_release_mem");
-               if (rc)
-                       pr_err("unable to create fadump_release_mem symlink 
(%d)",
-                              rc);
-       }
-       return;
 }
 
 static int __init fadump_setup_elfcorehdr_buf(void)
-- 
2.51.1


Reply via email to