I would have written it in different style:
if (buffer_size)
retval = -ERANGE;
else if (attr_size > SSIZE_MAX)
retval = -EOVERFLOW;
else
retval = attr_size; /* request to get the attr_size */
But the behaviour change itself makes sense, so:
Reviewed-by: Christian Schoenebeck <linux_oss@xxxxxxxxxxxxx>
} else {
iov_iter_truncate(&to, attr_size);
retval = p9_client_read(attr_fid, 0, &to, &err);