aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTejun Heo2013-02-27 17:03:53 -0800
committerLinus Torvalds2013-02-27 19:10:14 -0800
commit12d1b4393e0d8df36b2646a5e512f0513fb532d2 (patch)
treea705b06b3d0ece29b0f34fedba87d18543ac1b80 /net
parent49038ef4fbe2842bd4d8338f89ec5c9ba71b0ae1 (diff)
idr: remove _idr_rc_to_errno() hack
idr uses -1, IDR_NEED_TO_GROW and IDR_NOMORE_SPACE to communicate exception conditions internally. The return value is later translated to errno values using _idr_rc_to_errno(). This is confusing. Drop the custom ones and consistently use -EAGAIN for "tree needs to grow", -ENOMEM for "need more memory" and -ENOSPC for "ran out of ID space". Due to the weird memory preloading mechanism, [ra]_get_new*() return -EAGAIN on memory shortage, so we need to substitute -ENOMEM w/ -EAGAIN on those interface functions. They'll eventually be cleaned up and the translations will go away. This patch doesn't introduce any functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions