[Devel] [PATCH RHEL7 COMMIT] fuse: Try automatically load kio module

Konstantin Khorenko khorenko at virtuozzo.com
Wed May 16 11:37:01 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.47.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.47.6
------>
commit 5100a4177c8bd3f3f13cefa936207f6aa02c17d1
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Wed May 16 11:37:00 2018 +0300

    fuse: Try automatically load kio module
    
    Make admin and developer life easier: load the module
    automatically, avoid manual modprobe.
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/inode.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index f89bda719c71..9941561587ff 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -500,7 +500,8 @@ EXPORT_SYMBOL_GPL(fuse_unregister_kio);
 static struct fuse_kio_ops *fuse_kio_get(struct fuse_conn *fc, char *name)
 {
 	struct fuse_kio_ops *ops;
-
+	bool once = true;
+again:
 	mutex_lock(&fuse_mutex);
 	list_for_each_entry(ops, &fuse_kios_list, list) {
 		if (!strncmp(name, ops->name, FUSE_KIO_NAME) &&
@@ -511,6 +512,11 @@ static struct fuse_kio_ops *fuse_kio_get(struct fuse_conn *fc, char *name)
 		}
 	}
 	mutex_unlock(&fuse_mutex);
+	if (once) {
+		once = false;
+		request_module("fuse_kio_%s", name);
+		goto again;
+	}
 	return NULL;
 }
 


More information about the Devel mailing list