diff options
| author | Liu Bo <[email protected]> | 2016-05-18 00:21:48 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2016-05-25 17:53:54 +0000 |
| commit | 2d324f59f343967a03eeb2690f0ff178304d0687 (patch) | |
| tree | fa0bf2fb3cb07b89b049542e70ad523d6cad67f5 /fs/btrfs/dev-replace.c | |
| parent | Btrfs: free sys_array eb as soon as possible (diff) | |
| download | kernel-2d324f59f343967a03eeb2690f0ff178304d0687.tar.gz kernel-2d324f59f343967a03eeb2690f0ff178304d0687.zip | |
Btrfs: fix unexpected return value of fiemap
btrfs's fiemap is supposed to return 0 on success and return < 0 on
error. however, ret becomes 1 after looking up the last file extent:
btrfs_lookup_file_extent ->
btrfs_search_slot(..., ins_len=0, cow=0)
and if the offset is beyond EOF, we'll get 'path' pointed to the place
of potentail insertion, and ret == 1.
This may confuse applications using ioctl(FIEL_IOC_FIEMAP).
Signed-off-by: Liu Bo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
