[Devel] [PATCH RHEL7 COMMIT] fuse kio: Revert fuse_request_free() changes
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Oct 9 11:50:43 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.4
------>
commit 8576fb3b4ab75a1b7bafe165f16973a3f76cd69a
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Oct 9 11:50:40 2018 +0300
fuse kio: Revert fuse_request_free() changes
Currently, it's a dead code, so there is no functional
changes. But I do this for next patches, to make the code
more predictable.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Reviewed-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
fs/fuse/dev.c | 12 ++----------
fs/fuse/file.c | 4 ++--
fs/fuse/fuse_i.h | 3 +--
fs/fuse/inode.c | 4 ++--
4 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 0a7e3f4c6168..ce75d218025b 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -115,7 +115,7 @@ struct fuse_req *fuse_request_alloc_nofs(struct fuse_conn *fc, unsigned npages)
return __fuse_request_alloc(fc, npages, GFP_NOFS);
}
-void fuse_generic_request_free(struct fuse_req *req)
+void fuse_request_free(struct fuse_req *req)
{
if (req->pages != req->inline_pages) {
kfree(req->pages);
@@ -124,14 +124,6 @@ void fuse_generic_request_free(struct fuse_req *req)
kmem_cache_free(req->cache, req);
}
-void fuse_request_free(struct fuse_conn *fc, struct fuse_req *req)
-{
- if (fc->kio.op && fc->kio.op->req_free)
- return fc->kio.op->req_free(fc, req);
-
- return fuse_generic_request_free(req);
-}
-
void __fuse_get_request(struct fuse_req *req)
{
atomic_inc(&req->count);
@@ -332,7 +324,7 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req)
if (req->stolen_file)
put_reserved_req(fc, req);
else
- fuse_request_free(fc, req);
+ fuse_request_free(req);
}
}
EXPORT_SYMBOL_GPL(fuse_put_request);
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d0451cfcd3ee..8611283f7a9a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -111,7 +111,7 @@ static void fuse_file_list_del(struct fuse_file *ff)
void fuse_file_free(struct fuse_file *ff)
{
fuse_file_list_del(ff);
- fuse_request_free(ff->fc, ff->reserved_req);
+ fuse_request_free(ff->reserved_req);
kfree(ff);
}
@@ -2126,7 +2126,7 @@ static int fuse_writepage_locked(struct page *page,
printk("FUSE: page dirtied on dead file\n");
__free_page(tmp_page);
err_free:
- fuse_request_free(fc, req);
+ fuse_request_free(req);
err:
mapping_set_error(page->mapping, error);
end_page_writeback(page);
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 45d1026dea27..4ececf9acff5 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -516,7 +516,6 @@ struct fuse_kio_ops {
/* Request handling hooks */
struct fuse_req *(*req_alloc)(struct fuse_conn *fc, unsigned nrpages,
gfp_t flags);
- void (*req_free)(struct fuse_conn *fc, struct fuse_req *req);
int (*req_send)(struct fuse_conn *fc, struct fuse_req *req, bool bg,
bool locked);
@@ -912,7 +911,7 @@ struct fuse_req *fuse_request_alloc_nofs(struct fuse_conn *fc, unsigned npages);
/**
* Free a request
*/
-void fuse_request_free(struct fuse_conn *fc, struct fuse_req *req);
+void fuse_request_free(struct fuse_req *req);
/**
* Get a request, may fail with -ENOMEM,
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 9b57e65fb1ed..0f507b242e1f 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -820,7 +820,7 @@ void fuse_conn_put(struct fuse_conn *fc)
{
if (atomic_dec_and_test(&fc->count)) {
if (fc->destroy_req)
- fuse_request_free(fc, fc->destroy_req);
+ fuse_request_free(fc->destroy_req);
mutex_destroy(&fc->inst_mutex);
put_pid_ns(fc->pid_ns);
fc->release(fc);
@@ -1380,7 +1380,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
err_unlock:
mutex_unlock(&fuse_mutex);
err_free_init_req:
- fuse_request_free(fc, init_req);
+ fuse_request_free(init_req);
err_put_root:
dput(root_dentry);
err_put_io:
More information about the Devel
mailing list