diff options
author | Su Yue <suy.fnst@cn.fujitsu.com> | 2018-05-30 16:48:56 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-30 16:51:08 +0200 |
commit | 090a127afa8f73e9618d4058d6755f7ec7453dd6 (patch) | |
tree | 2ca06a315fa51310c4c544963ac9fef5e12079b5 /fs/btrfs/raid56.c | |
parent | 6b0cb1f90147908f7d85dd15e4dec56c8b6b632f (diff) | |
download | blackbird-obmc-linux-090a127afa8f73e9618d4058d6755f7ec7453dd6.tar.gz blackbird-obmc-linux-090a127afa8f73e9618d4058d6755f7ec7453dd6.zip |
btrfs: return error value if create_io_em failed in cow_file_range
In cow_file_range(), create_io_em() may fail, but its return value is
not recorded. Then return value may be 0 even it failed which is a
wrong behavior.
Let cow_file_range() return PTR_ERR(em) if create_io_em() failed.
Fixes: 6f9994dbabe5 ("Btrfs: create a helper to create em for IO")
CC: stable@vger.kernel.org # 4.11+
Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.c')
0 files changed, 0 insertions, 0 deletions