diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-18 18:10:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-18 18:10:38 -0800 |
| commit | fdea9fc98bc266f5992b35c01737e5e6f70ffdd1 (patch) | |
| tree | 522e3b6ebb808f4f4a354b63954cd0964e45b294 | |
| parent | 6f2a9d7b968b6f06031a8ac7efaf073fd1975b9a (diff) | |
Broken applications do not realize that a zero return
from "write()" is an error condition, and hang retrying.
Return EINVAL in sysfs instead.
| -rw-r--r-- | fs/sysfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index ad364d6aacb8..758b72b50602 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -243,7 +243,7 @@ sysfs_write_file(struct file *file, const char *buf, size_t count, loff_t *ppos) if (kobj && kobj->subsys) ops = kobj->subsys->sysfs_ops; if (!ops || !ops->store) - return 0; + return -EINVAL; page = (char *)__get_free_page(GFP_KERNEL); if (!page) |
