Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Pekka J Enberg
Andrew Morton writes: That's lame. It'd be better to hunt down all the -ENOMEMs and fix them up. So there's our verdict. Thanks, Andrew :-) Pekka - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Andrew Morton
Pekka Enberg <[EMAIL PROTECTED]> wrote: > > @@ -310,6 +310,8 @@ ssize_t vfs_write(struct file *file, con > } > } > > + if (ret == -ENOMEM) > + ret = -ENOBUFS; > return ret; > } > That's lame. It'd be better to hunt down all the

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Pekka Enberg
On 8/23/05, Nathan Scott <[EMAIL PROTECTED]> wrote: > FWIW, all filesystems using the generic page cache routines are able > to return this - see mm/filemap.c -> generic_file_buffered_write... I don't think it makes much sense to fix this in individual filesystems as many functions returning

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Nathan Scott
> On 8/19/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote: > > According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed > > (surprisingly read() is allowed to use both ENOMEM and ENOBUFS): > > > > http://www.opengroup.org/onlinepubs/95399/functions/write.html > > > > Should

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Nathan Scott
On 8/19/05, Dmitry Torokhov [EMAIL PROTECTED] wrote: According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed (surprisingly read() is allowed to use both ENOMEM and ENOBUFS): http://www.opengroup.org/onlinepubs/95399/functions/write.html Should we adjust sysfs

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Pekka Enberg
On 8/23/05, Nathan Scott [EMAIL PROTECTED] wrote: FWIW, all filesystems using the generic page cache routines are able to return this - see mm/filemap.c - generic_file_buffered_write... I don't think it makes much sense to fix this in individual filesystems as many functions returning -NOMEM

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Andrew Morton
Pekka Enberg [EMAIL PROTECTED] wrote: @@ -310,6 +310,8 @@ ssize_t vfs_write(struct file *file, con } } + if (ret == -ENOMEM) + ret = -ENOBUFS; return ret; } That's lame. It'd be better to hunt down all the -ENOMEMs and fix

Re: sysfs: write returns ENOMEM?

2005-08-23 Thread Pekka J Enberg
Andrew Morton writes: That's lame. It'd be better to hunt down all the -ENOMEMs and fix them up. So there's our verdict. Thanks, Andrew :-) Pekka - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: sysfs: write returns ENOMEM?

2005-08-19 Thread Greg KH
On Fri, Aug 19, 2005 at 12:55:25AM -0500, Dmitry Torokhov wrote: > [Apologies if you see this message twice - I accidentially sent it in HTML > format first time around and I am pretty sure LKML will eat it] > > Hi, > > According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed

Re: sysfs: write returns ENOMEM?

2005-08-19 Thread Pekka Enberg
Hi Dmitry, On 8/19/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote: > According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed > (surprisingly read() is allowed to use both ENOMEM and ENOBUFS): > > http://www.opengroup.org/onlinepubs/95399/functions/write.html > > Should we

Re: sysfs: write returns ENOMEM?

2005-08-19 Thread Pekka Enberg
Hi Dmitry, On 8/19/05, Dmitry Torokhov [EMAIL PROTECTED] wrote: According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed (surprisingly read() is allowed to use both ENOMEM and ENOBUFS): http://www.opengroup.org/onlinepubs/95399/functions/write.html Should we adjust

Re: sysfs: write returns ENOMEM?

2005-08-19 Thread Greg KH
On Fri, Aug 19, 2005 at 12:55:25AM -0500, Dmitry Torokhov wrote: [Apologies if you see this message twice - I accidentially sent it in HTML format first time around and I am pretty sure LKML will eat it] Hi, According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed