From: Pekka Enberg <penberg@gmail.com>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: sysfs: write returns ENOMEM?
Date: Fri, 19 Aug 2005 10:39:39 +0300 [thread overview]
Message-ID: <84144f020508190039322a486c@mail.gmail.com> (raw)
In-Reply-To: <200508190055.25747.dtor_core@ameritech.net>
Hi Dmitry,
On 8/19/05, Dmitry Torokhov <dtor_core@ameritech.net> 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/000095399/functions/write.html
>
> Should we adjust sysfs write to follow the standard?
Please note that sysfs is not the only one to do this. A quick peek
reveals XFS and CIFS returing ENOMEM for write() and there are
probably others as well. Perhaps we should replace ENOMEM with ENOBUFS
in vfs_write() instead?
linvfs_write
xfs_write
xfs_zero_eof
xfs_zero_last_block
xfs_iozero
-> Returns -ENOMEM
cifs_user_write
cifs_reopen_file
-> Returns -ENOMEM
Pekka
next prev parent reply other threads:[~2005-08-19 7:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11394.1124781401@kao2.melbourne.sgi.com>
2005-08-19 5:55 ` sysfs: write returns ENOMEM? Dmitry Torokhov
2005-08-19 7:29 ` Greg KH
2005-08-19 7:39 ` Pekka Enberg [this message]
2005-08-23 7:32 ` Nathan Scott
2005-08-23 7:55 ` Pekka Enberg
2005-08-23 8:28 ` Andrew Morton
2005-08-23 8:36 ` Pekka J Enberg
2005-08-23 8:46 ` [PATCH] mm: return ENOBUFS instead of ENOMEM in generic_file_buffered_write Pekka J Enberg
2005-08-23 11:55 ` Christoph Hellwig
2005-08-23 13:50 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84144f020508190039322a486c@mail.gmail.com \
--to=penberg@gmail.com \
--cc=dtor_core@ameritech.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox