diff mbox series

[2/4] kernfs: restrict to local file handles

Message ID 20241201-work-exportfs-v1-2-b850dda4502a@kernel.org (mailing list archive)
State New
Headers show
Series exportfs: add flag to allow marking export operations as only supporting file handles | expand

Commit Message

Christian Brauner Dec. 1, 2024, 1:12 p.m. UTC
The kernfs filesystem uses local file handles that cannot be
exported. Mark its export operations accordingly.

Fixes: aa8188253474 ("kernfs: add exportfs operations")
Cc: stable <stable@kernel.org> # >= 4.14
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 fs/kernfs/mount.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 1358c21837f1a0fe1b109e39134e993d0ef83879..c6266ecc78a3ca767e3dcab24fde7c2b79f5370d 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -154,6 +154,7 @@  static const struct export_operations kernfs_export_ops = {
 	.fh_to_dentry	= kernfs_fh_to_dentry,
 	.fh_to_parent	= kernfs_fh_to_parent,
 	.get_parent	= kernfs_get_parent_dentry,
+	.flags		= EXPORT_OP_LOCAL_FILE_HANDLE,
 };
 
 /**