Skip to content

Commit a39162f

Browse files
amir73ilbrauner
authored andcommitted
exportfs: clarify the documentation of open()/permission() expotrfs ops
pidfs and nsfs recently gained support for encode/decode of file handles via name_to_handle_at(2)/open_by_handle_at(2). These special kernel filesystems have custom ->open() and ->permission() export methods, which nfsd does not respect and it was never meant to be used for exporting those filesystems by nfsd. Update kernel-doc comments to express the fact the those methods are for open_by_handle(2) system only and not compatible with nfsd. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Link: https://patch.msgid.link/20260129100212.49727-2-amir73il@gmail.com Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent b135386 commit a39162f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

include/linux/exportfs.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ struct handle_to_path_ctx {
200200
* @get_parent: find the parent of a given directory
201201
* @commit_metadata: commit metadata changes to stable storage
202202
*
203+
* Methods for open_by_handle(2) syscall with special kernel file systems:
204+
* @permission: custom permission for opening a file by handle
205+
* @open: custom open routine for opening file by handle
206+
*
203207
* See Documentation/filesystems/nfs/exporting.rst for details on how to use
204208
* this interface correctly and the definition of the flags.
205209
*
@@ -244,10 +248,14 @@ struct handle_to_path_ctx {
244248
* space cannot be allocated, a %ERR_PTR should be returned.
245249
*
246250
* @permission:
247-
* Allow filesystems to specify a custom permission function.
251+
* Allow filesystems to specify a custom permission function for the
252+
* open_by_handle_at(2) syscall instead of the default permission check.
253+
* This custom permission function is not respected by nfsd.
248254
*
249255
* @open:
250-
* Allow filesystems to specify a custom open function.
256+
* Allow filesystems to specify a custom open function for the
257+
* open_by_handle_at(2) syscall instead of the default file_open_root().
258+
* This custom open function is not respected by nfsd.
251259
*
252260
* @commit_metadata:
253261
* @commit_metadata should commit metadata changes to stable storage.

0 commit comments

Comments
 (0)