summaryrefslogtreecommitdiff
path: root/drivers/block/cfq-iosched.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-04-29 06:26:06 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 22:15:03 (GMT)
commit6c1852a08e444a2e66367352a99c0e93c8bf3e97 (patch)
treeffa075f75b7eb0e5b1399aeb8e34e6cf9a631a10 /drivers/block/cfq-iosched.c
parentfc7e4828995d8c9e4c9597f8a19179e4ab53f73e (diff)
downloadlinux-6c1852a08e444a2e66367352a99c0e93c8bf3e97.tar.xz
[PATCH] sysfs: (driver/block) if show/store is missing return -EIO
sysfs: fix drivers/block so if an attribute doesn't implement show or store method read/write will return -EIO instead of 0 or -EINVAL. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/cfq-iosched.c')
-rw-r--r--drivers/block/cfq-iosched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 2210bac..3ac47dd 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1775,7 +1775,7 @@ cfq_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
struct cfq_fs_entry *entry = to_cfq(attr);
if (!entry->show)
- return 0;
+ return -EIO;
return entry->show(e->elevator_data, page);
}
@@ -1788,7 +1788,7 @@ cfq_attr_store(struct kobject *kobj, struct attribute *attr,
struct cfq_fs_entry *entry = to_cfq(attr);
if (!entry->store)
- return -EINVAL;
+ return -EIO;
return entry->store(e->elevator_data, page, length);
}