summaryrefslogtreecommitdiff
path: root/lib/idr.c
diff options
context:
space:
mode:
authorPhilipp Stanner <pstanner@redhat.com>2023-08-21 10:21:29 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2023-09-05 19:01:38 -0400
commite7716c74e3882405f9eca16faa6cb1bf19995399 (patch)
tree13fcc03b9751bd875fb3c67ac1002118a27d1566 /lib/idr.c
parentcbc02854331edc6dc22d8b77b6e22e38ebc7dd51 (diff)
xarray: Document necessary flag in alloc functions
Adds a new line to the docstrings of functions wrapping __xa_alloc() and __xa_alloc_cyclic(), informing about the necessity of flag XA_FLAGS_ALLOC being set previously. The documentation so far says that functions wrapping __xa_alloc() and __xa_alloc_cyclic() are supposed to return either -ENOMEM or -EBUSY in case of an error. If the xarray has been initialized without the flag XA_FLAGS_ALLOC, however, they fail with a different, undocumented error code. As hinted at in Documentation/core-api/xarray.rst, wrappers around these functions should only be invoked when the flag has been set. The functions' documentation should reflect that as well. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'lib/idr.c')
0 files changed, 0 insertions, 0 deletions