aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2015-12-15 11:48:19 -0500
committerBrian Behlendorf <[email protected]>2016-01-23 10:10:44 -0800
commitbe29e6a6e682123a009d20b2c5ab0b5393f43a8b (patch)
tree3ec79249c27855e74598fe9156623dfeb9b921a1 /include
parent7323da1b2f337f5dab52452e7b765f4a0bc99b78 (diff)
kobj_read_file: Return -1 on vn_rdwr() error
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in zfsonlinux/zfs#4104. Note that we no longer pass RLIM64_INFINITY with this, but our vn_rdwr implementation did not support it anyway, so there is no difference. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #513
Diffstat (limited to 'include')
-rw-r--r--include/sys/kobj.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sys/kobj.h b/include/sys/kobj.h
index f95fa8039..334449a8e 100644
--- a/include/sys/kobj.h
+++ b/include/sys/kobj.h
@@ -35,8 +35,8 @@ typedef struct _buf buf_t;
extern struct _buf *kobj_open_file(const char *name);
extern void kobj_close_file(struct _buf *file);
-extern int kobj_read_file(struct _buf *file, char *buf,
- ssize_t size, offset_t off);
+extern int kobj_read_file(struct _buf *file, char *buf, unsigned size,
+ unsigned off);
extern int kobj_get_filesize(struct _buf *file, uint64_t *size);
#endif /* SPL_KOBJ_H */