diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-05-17 17:21:48 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-07 18:18:55 -0700 |
commit | 327b1cf89e87607cf1d999a27481245b2610149c (patch) | |
tree | fab881b7e3da50e7c3b5a2f9b50c9839922f1365 /drivers/fpga/fpga-mgr.c | |
parent | ac5414fc59a48c5a9fb7b1f0e98251dbd4f2f0f4 (diff) |
Btrfs: fix unexpected return value of fiemap
commit 2d324f59f343967a03eeb2690f0ff178304d0687 upstream.
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 <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions