summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-11-18 18:10:38 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-11-18 18:10:38 -0800
commitfdea9fc98bc266f5992b35c01737e5e6f70ffdd1 (patch)
tree522e3b6ebb808f4f4a354b63954cd0964e45b294
parent6f2a9d7b968b6f06031a8ac7efaf073fd1975b9a (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.c2
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)