Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

kobj_read_file: Return -1 on vn_rdwr() error #513

Closed
wants to merge 1 commit into from
Closed

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Dec 15, 2015

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 openzfs/zfs#4104.

The function is tiny enough that my patch could qualify to be called a
"rewrite", so I am just copying the function on the basis that a rewrite
allows me to license the code under both the CDDL and GPL.

Signed-off-by: Richard Yao [email protected]

@ryao ryao force-pushed the kobj branch 2 times, most recently from ab142af to d34337d Compare December 15, 2015 16:59
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 openzfs/zfs#4104.

The function is tiny enough that my patch could qualify to be called a
"rewrite", so I am just copying the function on the basis that a rewrite
allows me to license the code under both the CDDL and GPL.

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]>
behlendorf added a commit that referenced this pull request Jan 23, 2016
Previous commit be29e6a updated kobj_read_file() so it no longer
unconditionally passes RLIM64_INFINITY.  The vn_rdwr() function
needs to be updated accordingly.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue #513
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant