lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Small bug fix for aio
From
Date
On Wed, 2003-04-23 at 20:14, Benjamin LaHaise wrote:
> On Tue, Apr 22, 2003 at 06:54:51PM -0700, Mingming Cao wrote:
> > Here is a trivial patch fixed a bug in ioctx_alloc(). If
> > aio_setup_ring() failed, ioctx_alloc() should pass the return error from
> > aio_setup_ring() back to sys_io_setup().
>
> This particular case was intentional: -ENOMEM really is the right return
> code when the ring cannot be allocated. Mixing it up with the potential
> return codes from do_mmap or other functions might result in a very
> nonsensical return. Perhaps someone can provide an arguement in favour
> of propagating the value, but I think it really can only mean "you asked
> the kernel to allocate too much memory or did something stupidly buggy with
> threads". Cheers,
>
> -ben

Ok, then I think -ENOMEM makes more sense. Thanks for clarifying.


Mingming

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.071 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site