Carlos Maiolino 30460e1ea3 fs: Enable bmap() function to properly return errors
By now, bmap() will either return the physical block number related to
the requested file offset or 0 in case of error or the requested offset
maps into a hole.
This patch makes the needed changes to enable bmap() to proper return
errors, using the return value as an error return, and now, a pointer
must be passed to bmap() to be filled with the mapped physical block.

It will change the behavior of bmap() on return:

- negative value in case of error
- zero on success or map fell into a hole

In case of a hole, the *block will be zero too

Since this is a prep patch, by now, the only error return is -EINVAL if
->bmap doesn't exist.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2020-02-03 08:05:37 -05:00
..
2019-05-08 21:23:11 -07:00
2018-09-12 13:07:10 -07:00
2018-09-12 13:07:10 -07:00
2019-08-12 19:33:51 -07:00
2019-11-07 10:40:59 -08:00
2019-11-30 11:02:30 -08:00
2019-11-07 10:40:59 -08:00
\n
2019-11-30 11:16:07 -08:00
2019-11-25 10:01:27 -08:00
2018-09-12 13:07:10 -07:00
2019-08-12 19:33:51 -07:00
2019-08-12 19:33:51 -07:00