Commit c3d8e0b
ceph: return the real size read when it hits EOF
Currently, if the sync read handler ends up reading more from the last
object in the file than the i_size indicates, then it'll end up
returning the wrong length. Ensure that we cap the returned length and
pos at the EOF.
Signed-off-by: Xiubo Li <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>1 parent 8cfc0c7 commit c3d8e0b
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
850 | 851 | | |
851 | 852 | | |
852 | 853 | | |
| |||
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
873 | | - | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
| 956 | + | |
958 | 957 | | |
959 | | - | |
960 | | - | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
961 | 964 | | |
962 | 965 | | |
963 | 966 | | |
| |||
0 commit comments