Commit cadfbb6e authored by Al Viro's avatar Al Viro Committed by Jens Axboe

dax_io(): don't let non-error value escape via retval instead of EFAULT

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent ccc2600b
...@@ -169,8 +169,10 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, ...@@ -169,8 +169,10 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
else else
len = iov_iter_zero(max - pos, iter); len = iov_iter_zero(max - pos, iter);
if (!len) if (!len) {
retval = -EFAULT;
break; break;
}
pos += len; pos += len;
addr += len; addr += len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment