[PATCH 16/29] ovl: add EXPORT_OP_STABLE_HANDLES flag to export operations

Jeff Layton
2026-01-15T17:49:48Z

Add the EXPORT_OP_STABLE_HANDLES flag to overlayfs export operations to indicate
that this filesystem can be exported via NFS.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/overlayfs/export.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c
index 83f80fdb156749e65a4ea0ab708cbff338dacdad..17c92a228120e1803135cc2b4fe4180f5e343f88 100644
--- a/fs/overlayfs/export.c
+++ b/fs/overlayfs/export.c
@@ -865,9 +865,11 @@ const struct export_operations ovl_export_operations = {
.fh_to_parent = ovl_fh_to_parent,
.get_name = ovl_get_name,
.get_parent = ovl_get_parent,
+ .flags = EXPORT_OP_STABLE_HANDLES,
};

/* encode_fh() encodes non-decodable file handles with nfs_export=off */
const struct export_operations ovl_export_fid_operations = {
.encode_fh = ovl_encode_fh,
+ .flags = EXPORT_OP_STABLE_HANDLES,
};

--
2.52.0