summaryrefslogtreecommitdiffstats
path: root/net/9p/mod.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-07-11 14:02:24 -0700
committerDominique Martinet <dominique.martinet@cea.fr>2018-08-29 13:39:57 +0900
commit996d5b4db4b191f2676cf8775565cab8a5e2753b (patch)
tree586a82cc32aebc85a181bc1cc837062f3d34660f /net/9p/mod.c
parent62e3941776fea8678bb8120607039410b1b61a65 (diff)
downloadtalos-obmc-linux-996d5b4db4b191f2676cf8775565cab8a5e2753b.tar.gz
talos-obmc-linux-996d5b4db4b191f2676cf8775565cab8a5e2753b.zip
9p: Use a slab for allocating requests
Replace the custom batch allocation with a slab. Use an IDR to store pointers to the active requests instead of an array. We don't try to handle P9_NOTAG specially; the IDR will happily shrink all the way back once the TVERSION call has completed. Link: http://lkml.kernel.org/r/20180711210225.19730-6-willy@infradead.org Signed-off-by: Matthew Wilcox <willy@infradead.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Ron Minnich <rminnich@sandia.gov> Cc: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Diffstat (limited to 'net/9p/mod.c')
-rw-r--r--net/9p/mod.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/9p/mod.c b/net/9p/mod.c
index 253ba824a325..0da56d6af73b 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -171,11 +171,17 @@ void v9fs_put_trans(struct p9_trans_module *m)
*/
static int __init init_p9(void)
{
+ int ret;
+
+ ret = p9_client_init();
+ if (ret)
+ return ret;
+
p9_error_init();
pr_info("Installing 9P2000 support\n");
p9_trans_fd_init();
- return 0;
+ return ret;
}
/**
@@ -188,6 +194,7 @@ static void __exit exit_p9(void)
pr_info("Unloading 9P2000 support\n");
p9_trans_fd_exit();
+ p9_client_exit();
}
module_init(init_p9)
OpenPOWER on IntegriCloud