Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

liveupdate: remove liveupdate_test_unregister()

Now that file handler unregistration automatically unregisters all
associated file handlers (FLBs), the liveupdate_test_unregister() function
is no longer needed. Remove it along with its usages and declarations.

Link: https://lore.kernel.org/20260327033335.696621-9-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Cc: David Matlack <dmatlack@google.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Samiullah Khawaja <skhawaja@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Pasha Tatashin and committed by
Andrew Morton
07448800 5ee1c7d6

-22
-2
kernel/liveupdate/luo_file.c
··· 926 926 if (!liveupdate_enabled()) 927 927 return -EOPNOTSUPP; 928 928 929 - liveupdate_test_unregister(fh); 930 - 931 929 guard(rwsem_write)(&luo_register_rwlock); 932 930 luo_flb_unregister_all(fh); 933 931 list_del(&ACCESS_PRIVATE(fh, list));
-2
kernel/liveupdate/luo_internal.h
··· 110 110 111 111 #ifdef CONFIG_LIVEUPDATE_TEST 112 112 void liveupdate_test_register(struct liveupdate_file_handler *fh); 113 - void liveupdate_test_unregister(struct liveupdate_file_handler *fh); 114 113 #else 115 114 static inline void liveupdate_test_register(struct liveupdate_file_handler *fh) { } 116 - static inline void liveupdate_test_unregister(struct liveupdate_file_handler *fh) { } 117 115 #endif 118 116 119 117 #endif /* _LINUX_LUO_INTERNAL_H */
-18
lib/tests/liveupdate.c
··· 135 135 TEST_NFLBS, fh->compatible); 136 136 } 137 137 138 - void liveupdate_test_unregister(struct liveupdate_file_handler *fh) 139 - { 140 - int err, i; 141 - 142 - for (i = 0; i < TEST_NFLBS; i++) { 143 - struct liveupdate_flb *flb = &test_flbs[i]; 144 - 145 - err = liveupdate_unregister_flb(fh, flb); 146 - if (err) { 147 - pr_err("Failed to unregister %s %pe\n", 148 - flb->compatible, ERR_PTR(err)); 149 - } 150 - } 151 - 152 - pr_info("Unregistered %d FLBs from file handler: [%s]\n", 153 - TEST_NFLBS, fh->compatible); 154 - } 155 - 156 138 MODULE_LICENSE("GPL"); 157 139 MODULE_AUTHOR("Pasha Tatashin <pasha.tatashin@soleen.com>"); 158 140 MODULE_DESCRIPTION("In-kernel test for LUO mechanism");