Skip to content

Commit

Permalink
orangefs: fix do_readv_writev() handling of error halfway through
Browse files Browse the repository at this point in the history
Error should only be returned if nothing had been read/written.
Otherwise we need to report a short read/write instead.

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Mike Marshall <[email protected]>
  • Loading branch information
Al Viro authored and hubcapsc committed Mar 26, 2016
1 parent 524b1d3 commit 6d4c1a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/orangefs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ static ssize_t do_readv_writev(enum ORANGEFS_io_type type, struct file *file,
break;
} /*end while */

out:
if (total_count > 0)
ret = total_count;
out:
if (ret > 0) {
if (type == ORANGEFS_IO_READ) {
file_accessed(file);
Expand Down

0 comments on commit 6d4c1a3

Please sign in to comment.