Commit e7716c7
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>1 parent cbc0285 commit e7716c7
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
859 | 862 | | |
860 | 863 | | |
861 | 864 | | |
| |||
886 | 889 | | |
887 | 890 | | |
888 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
889 | 895 | | |
890 | 896 | | |
891 | 897 | | |
| |||
916 | 922 | | |
917 | 923 | | |
918 | 924 | | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
919 | 928 | | |
920 | 929 | | |
921 | 930 | | |
| |||
949 | 958 | | |
950 | 959 | | |
951 | 960 | | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
952 | 964 | | |
953 | 965 | | |
954 | 966 | | |
| |||
983 | 995 | | |
984 | 996 | | |
985 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
986 | 1001 | | |
987 | 1002 | | |
988 | 1003 | | |
| |||
1017 | 1032 | | |
1018 | 1033 | | |
1019 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1020 | 1038 | | |
1021 | 1039 | | |
1022 | 1040 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1802 | 1802 | | |
1803 | 1803 | | |
1804 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1805 | 1808 | | |
1806 | 1809 | | |
1807 | 1810 | | |
| |||
1850 | 1853 | | |
1851 | 1854 | | |
1852 | 1855 | | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1853 | 1859 | | |
1854 | 1860 | | |
1855 | 1861 | | |
| |||
0 commit comments