Re: [PATCH] mm: return ENOBUFS instead of ENOMEM in generic_file_buffered_write

Dmitry Torokhov
2005-08-23T13:50:35Z

On 8/23/05, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Aug 23, 2005 at 11:46:33AM +0300, Pekka J Enberg wrote:
> > As noticed by Dmitry Torokhov, write() can not return ENOMEM:
> >
> > http://www.opengroup.org/onlinepubs/000095399/functions/write.html
> >
> > Therefore fixup generic_file_buffered_write() in mm/filemap.c (pointed out by
> > Nathan Scott).
>
> We had this discussion before, for EACCESS then. We've always been returning
> more errnos than SuS mentioned and Linus declared it's fine.
>

So does that mean that any error code is allowed? I would love to be
able to return ENODEV from a sysfs attribute if its device happens to
be removed in process. Is there a list of valid errnos for Linux that
supercedes SuS?

--
Dmitry