lkml.org 
[lkml]   [2012]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -v2 3/6] fuse: remove cache for fuse request allocation
Date
Remove fuse_req_cachep, which was used for fuse request buffer.
It is no longer used since the buffer is allocated dynamically
due to the tunable maximum read/write request size.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Nikolaus Rath <Nikolaus@rath.org>
Cc: Liu Yuan <namei.unix@gmail.com>
Cc: Has-Wen Nienhuys <hanwen@xs4all.nl>
---

fs/fuse/dev.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 511560b..4087ff4 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -23,8 +23,6 @@
MODULE_ALIAS_MISCDEV(FUSE_MINOR);
MODULE_ALIAS("devname:fuse");

-static struct kmem_cache *fuse_req_cachep;
-
static struct fuse_conn *fuse_get_conn(struct file *file)
{
/*
@@ -2075,27 +2073,10 @@ static struct miscdevice fuse_miscdevice = {

int __init fuse_dev_init(void)
{
- int err = -ENOMEM;
- fuse_req_cachep = kmem_cache_create("fuse_request",
- sizeof(struct fuse_req),
- 0, 0, NULL);
- if (!fuse_req_cachep)
- goto out;
-
- err = misc_register(&fuse_miscdevice);
- if (err)
- goto out_cache_clean;
-
- return 0;
-
- out_cache_clean:
- kmem_cache_destroy(fuse_req_cachep);
- out:
- return err;
+ return misc_register(&fuse_miscdevice);
}

void fuse_dev_cleanup(void)
{
misc_deregister(&fuse_miscdevice);
- kmem_cache_destroy(fuse_req_cachep);
}


\
 
 \ /
  Last update: 2012-07-19 16:41    [W:0.076 / U:2.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site