Skip to content

Commit 365982a

Browse files
bulwahnpcmoore
authored andcommitted
fs: anon_inodes: rephrase to appropriate kernel-doc
Commit e7e832c ("fs: add LSM-supporting anon-inode interface") adds more kerneldoc description, but also a few new warnings on anon_inode_getfd_secure() due to missing parameter descriptions. Rephrase to appropriate kernel-doc for anon_inode_getfd_secure(). Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent b537900 commit 365982a

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

fs/anon_inodes.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,20 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops,
202202
EXPORT_SYMBOL_GPL(anon_inode_getfd);
203203

204204
/**
205-
* Like anon_inode_getfd(), but creates a new !S_PRIVATE anon inode rather than
206-
* reuse the singleton anon inode, and calls the inode_init_security_anon() LSM
207-
* hook. This allows the inode to have its own security context and for a LSM
208-
* to reject creation of the inode. An optional @context_inode argument is
209-
* also added to provide the logical relationship with the new inode. The LSM
210-
* may use @context_inode in inode_init_security_anon(), but a reference to it
211-
* is not held.
205+
* anon_inode_getfd_secure - Like anon_inode_getfd(), but creates a new
206+
* !S_PRIVATE anon inode rather than reuse the singleton anon inode, and calls
207+
* the inode_init_security_anon() LSM hook. This allows the inode to have its
208+
* own security context and for a LSM to reject creation of the inode.
209+
*
210+
* @name: [in] name of the "class" of the new file
211+
* @fops: [in] file operations for the new file
212+
* @priv: [in] private data for the new file (will be file's private_data)
213+
* @flags: [in] flags
214+
* @context_inode:
215+
* [in] the logical relationship with the new inode (optional)
216+
*
217+
* The LSM may use @context_inode in inode_init_security_anon(), but a
218+
* reference to it is not held.
212219
*/
213220
int anon_inode_getfd_secure(const char *name, const struct file_operations *fops,
214221
void *priv, int flags,

0 commit comments

Comments
 (0)