Re: [PATCH] mm: return ENOBUFS instead of ENOMEM in generic_file_buffered_write
From: Dmitry Torokhov
Date: Tue Aug 23 2005 - 08:51:14 EST
On 8/23/05, Christoph Hellwig <hch@xxxxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/