* [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
@ 2024-11-07 9:57 Colin Ian King
2024-11-07 12:08 ` Dominique Martinet
0 siblings, 1 reply; 4+ messages in thread
From: Colin Ian King @ 2024-11-07 9:57 UTC (permalink / raw)
To: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, v9fs
Cc: kernel-janitors, linux-kernel
The helper functions v9fs_cache_register and v9fs_cache_unregister are
trivial helper functions that don't offer any extra functionality and
are unncessary. Replace them with direct calls to v9fs_init_inode_cache
and v9fs_destroy_inode_cache respectively to simplify the code.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
V1: originally cleaned up v9fs_cache_register to just a direct call
to v9fs_init_inode_cache.
V2: replace v9fs_cache_register and v9fs_cache_unregister with direct
calls and change subject line
---
fs/9p/v9fs.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 281a1ed03a04..77e9c4387c1d 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -659,21 +659,6 @@ static void v9fs_destroy_inode_cache(void)
kmem_cache_destroy(v9fs_inode_cache);
}
-static int v9fs_cache_register(void)
-{
- int ret;
-
- ret = v9fs_init_inode_cache();
- if (ret < 0)
- return ret;
- return ret;
-}
-
-static void v9fs_cache_unregister(void)
-{
- v9fs_destroy_inode_cache();
-}
-
/**
* init_v9fs - Initialize module
*
@@ -686,7 +671,7 @@ static int __init init_v9fs(void)
pr_info("Installing v9fs 9p2000 file system support\n");
/* TODO: Setup list of registered trasnport modules */
- err = v9fs_cache_register();
+ err = v9fs_init_inode_cache();
if (err < 0) {
pr_err("Failed to register v9fs for caching\n");
return err;
@@ -709,7 +694,7 @@ static int __init init_v9fs(void)
v9fs_sysfs_cleanup();
out_cache:
- v9fs_cache_unregister();
+ v9fs_destroy_inode_cache();
return err;
}
@@ -722,7 +707,7 @@ static int __init init_v9fs(void)
static void __exit exit_v9fs(void)
{
v9fs_sysfs_cleanup();
- v9fs_cache_unregister();
+ v9fs_destroy_inode_cache();
unregister_filesystem(&v9fs_fs_type);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
2024-11-07 9:57 [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls Colin Ian King
@ 2024-11-07 12:08 ` Dominique Martinet
2024-11-07 13:56 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Dominique Martinet @ 2024-11-07 12:08 UTC (permalink / raw)
To: Colin Ian King, Dan Carpenter
Cc: Eric Van Hensbergen, Latchesar Ionkov, Christian Schoenebeck,
v9fs, kernel-janitors, linux-kernel
Colin Ian King wrote on Thu, Nov 07, 2024 at 09:57:56AM +0000:
> The helper functions v9fs_cache_register and v9fs_cache_unregister are
> trivial helper functions that don't offer any extra functionality and
> are unncessary. Replace them with direct calls to v9fs_init_inode_cache
> and v9fs_destroy_inode_cache respectively to simplify the code.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thanks!
Acked-by: Dominique Martinet <asmadeus@codewreck.org>
@Dan, I don't have anything queued up 9p-wise so if you want to take it
through the janitor tree it'll probably get in faster; otherwise (if
you'd rather I take it or no reply in a while) I'll pick it up when
other patches come in.
--
Dominique
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
2024-11-07 12:08 ` Dominique Martinet
@ 2024-11-07 13:56 ` Dan Carpenter
2024-11-16 8:27 ` Dominique Martinet
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2024-11-07 13:56 UTC (permalink / raw)
To: Dominique Martinet
Cc: Colin Ian King, Eric Van Hensbergen, Latchesar Ionkov,
Christian Schoenebeck, v9fs, kernel-janitors, linux-kernel
On Thu, Nov 07, 2024 at 09:08:49PM +0900, Dominique Martinet wrote:
> Colin Ian King wrote on Thu, Nov 07, 2024 at 09:57:56AM +0000:
> > The helper functions v9fs_cache_register and v9fs_cache_unregister are
> > trivial helper functions that don't offer any extra functionality and
> > are unncessary. Replace them with direct calls to v9fs_init_inode_cache
> > and v9fs_destroy_inode_cache respectively to simplify the code.
> >
> > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>
> Thanks!
>
> Acked-by: Dominique Martinet <asmadeus@codewreck.org>
>
>
> @Dan, I don't have anything queued up 9p-wise so if you want to take it
> through the janitor tree it'll probably get in faster; otherwise (if
> you'd rather I take it or no reply in a while) I'll pick it up when
> other patches come in.
There isn't a janitor tree or any rush on this. ;)
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
2024-11-07 13:56 ` Dan Carpenter
@ 2024-11-16 8:27 ` Dominique Martinet
0 siblings, 0 replies; 4+ messages in thread
From: Dominique Martinet @ 2024-11-16 8:27 UTC (permalink / raw)
To: Dan Carpenter
Cc: Colin Ian King, Eric Van Hensbergen, Latchesar Ionkov,
Christian Schoenebeck, v9fs, kernel-janitors, linux-kernel
Dan Carpenter wrote on Thu, Nov 07, 2024 at 04:56:55PM +0300:
> On Thu, Nov 07, 2024 at 09:08:49PM +0900, Dominique Martinet wrote:
> > @Dan, I don't have anything queued up 9p-wise so if you want to take it
> > through the janitor tree it'll probably get in faster; otherwise (if
> > you'd rather I take it or no reply in a while) I'll pick it up when
> > other patches come in.
>
> There isn't a janitor tree or any rush on this. ;)
Sorry, I was somehow convinced you had a tree somewhere.
I've now taken it in 9p-next, will pobably submit it for next cycle.
Thanks,
--
Dominique Martinet | Asmadeus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-16 8:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 9:57 [PATCH][V2][next] fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls Colin Ian King
2024-11-07 12:08 ` Dominique Martinet
2024-11-07 13:56 ` Dan Carpenter
2024-11-16 8:27 ` Dominique Martinet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox