Skip to content

Commit d2ab36b

Browse files
erincandescentbrauner
authored andcommitted
pseudofs: add support for export_ops
Pseudo-filesystems might reasonably wish to implement the export ops (particularly for name_to_handle_at/open_by_handle_at); plumb this through pseudo_fs_context Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Erin Shepherd <erin.shepherd@e43.eu> Link: https://lore.kernel.org/r/20241113-pidfs_fh-v2-1-9a4d28155a37@e43.eu Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-1-87d803a42495@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent d8b47d0 commit d2ab36b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

fs/libfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ static int pseudo_fs_fill_super(struct super_block *s, struct fs_context *fc)
673673
s->s_blocksize_bits = PAGE_SHIFT;
674674
s->s_magic = ctx->magic;
675675
s->s_op = ctx->ops ?: &simple_super_operations;
676+
s->s_export_op = ctx->eops;
676677
s->s_xattr = ctx->xattr;
677678
s->s_time_gran = 1;
678679
root = new_inode(s);

include/linux/pseudo_fs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
struct pseudo_fs_context {
77
const struct super_operations *ops;
8+
const struct export_operations *eops;
89
const struct xattr_handler * const *xattr;
910
const struct dentry_operations *dops;
1011
unsigned long magic;

0 commit comments

Comments
 (0)