summaryrefslogtreecommitdiff
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2021-06-04 18:11:53 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2021-06-22 09:15:35 +0200
commitfe0a7bd81bfefe5eb73bce55682586c6c266e21e (patch)
treeb9e84e157d8022a19153d1833e562a5a86f95f17 /fs/fuse/fuse_i.h
parent2d82ab251ef0f6e7716279b04e9b5a01a86ca530 (diff)
downloadlinux-rpi-fe0a7bd81bfefe5eb73bce55682586c6c266e21e.tar.gz
linux-rpi-fe0a7bd81bfefe5eb73bce55682586c6c266e21e.tar.bz2
linux-rpi-fe0a7bd81bfefe5eb73bce55682586c6c266e21e.zip
fuse: add dedicated filesystem context ops for submounts
The creation of a submount is open-coded in fuse_dentry_automount(). This brings a lot of complexity and we recently had to fix bugs because we weren't setting SB_BORN or because we were unlocking sb->s_umount before sb was fully configured. Most of these could have been avoided by using the mount API instead of open-coding. Basically, this means coming up with a proper ->get_tree() implementation for submounts and call vfs_get_tree(), or better fc_mount(). The creation of the superblock for submounts is quite different from the root mount. Especially, it doesn't require to allocate a FUSE filesystem context, nor to parse parameters. Introduce a dedicated context ops for submounts to make this clear. This is just a placeholder for now, fuse_get_tree_submount() will be populated in a subsequent patch. Only visible change is that we stop allocating/freeing a useless FUSE filesystem context with submounts. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index f48dd7ff32af..b5957c8274dd 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1101,6 +1101,11 @@ int fuse_fill_super_submount(struct super_block *sb,
bool fuse_mount_remove(struct fuse_mount *fm);
/*
+ * Setup context ops for submounts
+ */
+int fuse_init_fs_context_submount(struct fs_context *fsc);
+
+/*
* Shut down the connection (possibly sending DESTROY request).
*/
void fuse_conn_destroy(struct fuse_mount *fm);