fuse: return patrial success from fuse_direct_io()
authorAshish Samant <ashish.samant@oracle.com>
Tue, 15 Mar 2016 04:57:35 +0000 (21:57 -0700)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 16 Mar 2016 13:38:31 +0000 (14:38 +0100)
commit742f992708dff0ada8b426228900ffb009c7167b
treedc353b2630af0a033d024f9c96e57027a1edd092
parent744742d692e37ad5c20630e57d526c8f2e2fe3c9
fuse: return patrial success from fuse_direct_io()

If a user calls writev/readv in direct io mode with partially valid data
in the iovec array such that any vector other than the first one in the
array contains invalid data, we currently return the error for the invalid
iovec.

Instead, we should return the number of bytes already written/read and not
the error as we do in the non direct_io case.

Reported-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c