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

From: Christian Brauner
Date: Sun Dec 01 2024 - 08:13:24 EST


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@xxxxxxxxxx> # >= 4.14
Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
---
fs/kernfs/mount.c | 1 +
1 file changed, 1 insertion(+)

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,
};

/**

--
2.45.2