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 <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Erin Shepherd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent d8b47d0 commit d2ab36b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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)